PageSourceSearch

https://culturelink.com.sg/wp-content/themes/culturelink-1/js/culturelink.js?v=1624872851359

js culturelink.com.sg collected 2026-10-08 22:53:37 UTC 1,198,771 bytes, 37,161 lines download raw bytes

vendor: 4,528 bytes, lines 1-112
1/*!
2 * Webflow: Front-end site library
3 * @license MIT
4 * Inline scripts may access the api using an async handler:
5 *   var Webflow = Webflow || [];
6 *   Webflow.push(readyFunction);
7 */
8/******/ (function(modules) { // webpackBootstrap
9/******/ 	// The module cache
10/******/ 	var installedModules = {};
11/******/
12/******/ 	// The require function
13/******/ 	function __webpack_require__(moduleId) {
14/******/
15/******/ 		// Check if module is in cache
16/******/ 		if(installedModules[moduleId]) {
17/******/ 			return installedModules[moduleId].exports;
18/******/ 		}
19/******/ 		// Create a new module (and put it into the cache)
20/******/ 		var module = installedModules[moduleId] = {
21/******/ 			i: moduleId,
22/******/ 			l: false,
23/******/ 			exports: {}
24/******/ 		};
25/******/
26/******/ 		// Execute the module function
27/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
28/******/
29/******/ 		// Flag the module as loaded
30/******/ 		module.l = true;
31/******/
32/******/ 		// Return the exports of the module
33/******/ 		return module.exports;
34/******/ 	}
35/******/
36/******/
37/******/ 	// expose the modules object (__webpack_modules__)
38/******/ 	__webpack_require__.m = modules;
39/******/
40/******/ 	// expose the module cache
41/******/ 	__webpack_require__.c = installedModules;
42/******/
43/******/ 	// define getter function for harmony exports
44/******/ 	__webpack_require__.d = function(exports, name, getter) {
45/******/ 		if(!__webpack_require__.o(exports, name)) {
46/******/ 			Object.defineProperty(exports, name, { enumerable: true, get: getter });
47/******/ 		}
48/******/ 	};
49/******/
50/******/ 	// define __esModule on exports
51/******/ 	__webpack_require__.r = function(exports) {
52/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
53/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
54/******/ 		}
55/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
56/******/ 	};
57/******/
58/******/ 	// create a fake namespace object
59/******/ 	// mode & 1: value is a module id, require it
60/******/ 	// mode & 2: merge all properties of value into the ns
61/******/ 	// mode & 4: return value when already ns object
62/******/ 	// mode & 8|1: behave like require
63/******/ 	__webpack_require__.t = function(value, mode) {
64/******/ 		if(mode & 1) value = __webpack_require__(value);
65/******/ 		if(mode & 8) return value;
66/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
67/******/ 		var ns = Object.create(null);
68/******/ 		__webpack_require__.r(ns);
69/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
70/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
71/******/ 		return ns;
72/******/ 	};
73/******/
74/******/ 	// getDefaultExport function for compatibility with non-harmony modules
75/******/ 	__webpack_require__.n = function(module) {
76/******/ 		var getter = module && module.__esModule ?
77/******/ 			function getDefault() { return module['default']; } :
78/******/ 			function getModuleExports() { return module; };
79/******/ 		__webpack_require__.d(getter, 'a', getter);
80/******/ 		return getter;
81/******/ 	};
82/******/
83/******/ 	// Object.prototype.hasOwnProperty.call
84/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
85/******/
86/******/ 	// __webpack_public_path__
87/******/ 	__webpack_require__.p = "";
88/******/
89/******/
90/******/ 	// Load entry module and return exports
91/******/ 	return __webpack_require__(__webpack_require__.s = 151);
92/******/ })
93/************************************************************************/
94/******/ ([
95/* 0 */
96/***/ (function(module, exports, __webpack_require__) {
97
98var global = __webpack_require__(7);
99var getOwnPropertyDescriptor = __webpack_require__(117).f;
100var hide = __webpack_require__(21);
101var redefine = __webpack_require__(118);
102var setGlobal = __webpack_require__(75);
103var copyConstructorProperties = __webpack_require__(231);
104var isForced = __webpack_require__(235);
105
106/*
107  options.target      - name of the target object
108  options.global      - target is the global object
109  options.stat        - export as static methods of target
110  options.proto       - export as prototype methods of target
111  options.real        - real prototype method for the `pure` version
112  options.forced      - export even if the native feature is available
113  options.bind        - bind methods to the target, required for the `pure` version
114  options.wrap        - wrap constructors to preventing global pollution, required for the `pure` version
115  options.unsafe      - use the simple assignment of property instead of delete + defineProperty
116  options.sham        - add a flag to not completely full polyfills
117  options.enumerable  - export as enumerable property
118  options.noTargetGet - prevent calling a getter on target
119*/
120module.exports = function (options, source) {
121  var TARGET = options.target;
122  var GLOBAL = options.global;
123  var STATIC = options.stat;
124  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
125  if (GLOBAL) {
126    target = global;
127  } else if (STATIC) {
128    target = global[TARGET] || setGlobal(TARGET, {});
129  } else {
130    target = (global[TARGET] || {}).prototype;
131  }
132  if (target) for (key in source) {
133    sourceProperty = source[key];
134    if (options.noTargetGet) {
135      descriptor = getOwnPropertyDescriptor(target, key);
136      targetProperty = descriptor && descriptor.value;
137    } else targetProperty = target[key];
138    FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
139    // contained in target
140    if (!FORCED && targetProperty !== undefined) {
141      if (typeof sourceProperty === typeof targetProperty) continue;
142      copyConstructorProperties(sourceProperty, targetProperty);
143    }
144    // add a flag to not completely full polyfills
145    if (options.sham || (targetProperty && targetProperty.sham)) {
146      hide(sourceProperty, 'sham', true);
147    }
148    // extend global
149    redefine(target, key, sourceProperty, options);
150  }
151};
152
153
154/***/ }),
155/* 1 */
156/***/ (function(module, exports) {
157
158function _interopRequireDefault(obj) {
159  return obj && obj.__esModule ? obj : {
160    "default": obj
161  };
162}
163
164module.exports = _interopRequireDefault;
165
166/***/ }),
167/* 2 */
168/***/ (function(module, exports) {
169
170/**
171 * Checks if `value` is classified as an `Array` object.
172 *
173 * @static
174 * @memberOf _
175 * @since 0.1.0
176 * @category Lang
177 * @param {*} value The value to check.
178 * @returns {boolean} Returns `true` if `value` is an array, else `false`.
179 * @example
180 *
181 * _.isArray([1, 2, 3]);
182 * // => true
183 *
184 * _.isArray(document.body.children);
185 * // => false
186 *
187 * _.isArray('abc');
188 * // => false
189 *
190 * _.isArray(_.noop);
191 * // => false
192 */
193var isArray = Array.isArray;
194
195module.exports = isArray;
196
197
198/***/ }),
199/* 3 */
200/***/ (function(module, exports, __webpack_require__) {
201
202var toInteger = __webpack_require__(26);
203
204var min = Math.min;
205
206// `ToLength` abstract operation
207// https://tc39.github.io/ecma262/#sec-tolength
208module.exports = function (argument) {
209  return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
210};
211
212
213/***/ }),
214/* 4 */
215/***/ (function(module, exports, __webpack_require__) {
216
217var requireObjectCoercible = __webpack_require__(73);
218
219// `ToObject` abstract operation
220// https://tc39.github.io/ecma262/#sec-toobject
221module.exports = function (argument) {
222  return Object(requireObjectCoercible(argument));
223};
224
225
226/***/ }),
227/* 5 */
228/***/ (function(module, exports, __webpack_require__) {
229
230var global = __webpack_require__(7);
231var shared = __webpack_require__(51);
232var uid = __webpack_require__(115);
233var NATIVE_SYMBOL = __webpack_require__(238);
234
235var Symbol = global.Symbol;
236var store = shared('wks');
237
238module.exports = function (name) {
239  return store[name] || (store[name] = NATIVE_SYMBOL && Symbol[name]
240    || (NATIVE_SYMBOL ? Symbol : uid)('Symbol.' + name));
241};
242
243
244/***/ }),
245/* 6 */
246/***/ (function(module, exports, __webpack_require__) {
247
248"use strict";
249
250
251var _interopRequireWildcard = __webpack_require__(39);
252
253Object.defineProperty(exports, "__esModule", {
254  value: true
255});
256var _exportNames = {
257  IX2EngineActionTypes: true,
258  IX2EngineConstants: true
259};
260exports.IX2EngineConstants = exports.IX2EngineActionTypes = void 0;
261
262var _triggerEvents = __webpack_require__(306);
263
264Object.keys(_triggerEvents).forEach(function (key) {
265  if (key === "default" || key === "__esModule") return;
266  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
267  Object.defineProperty(exports, key, {
268    enumerable: true,
269    get: function get() {
270      return _triggerEvents[key];
271    }
272  });
273});
274
275var _animationActions = __webpack_require__(307);
276
277Object.keys(_animationActions).forEach(function (key) {
278  if (key === "default" || key === "__esModule") return;
279  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
280  Object.defineProperty(exports, key, {
281    enumerable: true,
282    get: function get() {
283      return _animationActions[key];
284    }
285  });
286});
287
288var _triggerInteractions = __webpack_require__(308);
289
290Object.keys(_triggerInteractions).forEach(function (key) {
291  if (key === "default" || key === "__esModule") return;
292  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
293  Object.defineProperty(exports, key, {
294    enumerable: true,
295    get: function get() {
296      return _triggerInteractions[key];
297    }
298  });
299});
300
301var IX2EngineActionTypes = _interopRequireWildcard(__webpack_require__(309));
302
303exports.IX2EngineActionTypes = IX2EngineActionTypes;
304
305var IX2EngineConstants = _interopRequireWildcard(__webpack_require__(310));
306
307exports.IX2EngineConstants = IX2EngineConstants;
308
309/***/ }),
310/* 7 */
311/***/ (function(module, exports, __webpack_require__) {
312
313/* WEBPACK VAR INJECTION */(function(global) {var O = 'object';
314var check = function (it) {
315  return it && it.Math == Math && it;
316};
317
318// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
319module.exports =
320  // eslint-disable-next-line no-undef
321  check(typeof globalThis == O && globalThis) ||
322  check(typeof window == O && window) ||
323  check(typeof self == O && self) ||
324  check(typeof global == O && global) ||
325  // eslint-disable-next-line no-new-func
326  Function('return this')();
327
328/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44)))
329
330/***/ }),
331/* 8 */
332/***/ (function(module, exports) {
333
334module.exports = function (exec) {
335  try {
336    return !!exec();
337  } catch (error) {
338    return true;
339  }
340};
341
342
343/***/ }),
344/* 9 */
345/***/ (function(module, exports, __webpack_require__) {
346
347"use strict";
348 // @wf-will-never-add-flow-to-this-file
349
350/* globals window, document, navigator, WEBFLOW_ENV_TEST */
351
352/* eslint-disable no-var */
353
354/**
355 * Webflow: Core site library
356 */
357
358var Webflow = {};
359var modules = {};
360var primary = [];
361var secondary = window.Webflow || [];
362var $ = window.jQuery;
363var $win = $(window);
364var $doc = $(document);
365var isFunction = $.isFunction;
366
367var _ = Webflow._ = __webpack_require__(153);
368
369var tram = Webflow.tram = __webpack_require__(91) && $.tram;
370var domready = false;
371var destroyed = false;
372tram.config.hideBackface = false;
373tram.config.keepInherited = true;
374/**
375 * Webflow.define - Define a named module
376 * @param  {string} name
377 * @param  {function} factory
378 * @param  {object} options
379 * @return {object}
380 */
381
382Webflow.define = function (name, factory, options) {
383  if (modules[name]) {
384    unbindModule(modules[name]);
385  }
386
387  var instance = modules[name] = factory($, _, options) || {};
388  bindModule(instance);
389  return instance;
390};
391/**
392 * Webflow.require - Require a named module
393 * @param  {string} name
394 * @return {object}
395 */
396
397
398Webflow.require = function (name) {
399  return modules[name];
400};
401
402function bindModule(module) {
403  // If running in Webflow app, subscribe to design/preview events
404  if (Webflow.env()) {
405    isFunction(module.design) && $win.on('__wf_design', module.design);
406    isFunction(module.preview) && $win.on('__wf_preview', module.preview);
407  } // Subscribe to front-end destroy event
408
409
410  isFunction(module.destroy) && $win.on('__wf_destroy', module.destroy); // Look for ready method on module
411
412  if (module.ready && isFunction(module.ready)) {
413    addReady(module);
414  }
415}
416
417function addReady(module) {
418  // If domready has already happened, run ready method
419  if (domready) {
420    module.ready();
421    return;
422  } // Otherwise add ready method to the primary queue (only once)
423
424
425  if (_.contains(primary, module.ready)) {
426    return;
427  }
428
429  primary.push(module.ready);
430}
431
432function unbindModule(module) {
433  // Unsubscribe module from window events
434  isFunction(module.design) && $win.off('__wf_design', module.design);
435  isFunction(module.preview) && $win.off('__wf_preview', module.preview);
436  isFunction(module.destroy) && $win.off('__wf_destroy', module.destroy); // Remove ready method from primary queue
437
438  if (module.ready && isFunction(module.ready)) {
439    removeReady(module);
440  }
441}
442
443function removeReady(module) {
444  primary = _.filter(primary, function (readyFn) {
445    return readyFn !== module.ready;
446  });
447}
448/**
449 * Webflow.push - Add a ready handler into secondary queue
450 * @param {function} ready  Callback to invoke on domready
451 */
452
453
454Webflow.push = function (ready) {
455  // If domready has already happened, invoke handler
456  if (domready) {
457    isFunction(ready) && ready();
458    return;
459  } // Otherwise push into secondary queue
460
461
462  secondary.push(ready);
463};
464/**
465 * Webflow.env - Get the state of the Webflow app
466 * @param {string} mode [optional]
467 * @return {boolean}
468 */
469
470
471Webflow.env = function (mode) {
472  var designFlag = window.__wf_design;
473  var inApp = typeof designFlag !== 'undefined';
474
475  if (!mode) {
476    return inApp;
477  }
478
479  if (mode === 'design') {
480    return inApp && designFlag;
481  }
482
483  if (mode === 'preview') {
484    return inApp && !designFlag;
485  }
486
487  if (mode === 'slug') {
488    return inApp && window.__wf_slug;
489  }
490
491  if (mode === 'editor') {
492    return window.WebflowEditor;
493  }
494
495  if (mode === 'test') {
496    return  false || window.__wf_test;
497  }
498
499  if (mode === 'frame') {
500    return window !== window.top;
501  }
502}; // Feature detects + browser sniffs  ಠ_ಠ
503
504
505var userAgent = navigator.userAgent.toLowerCase();
506var touch = Webflow.env.touch = 'ontouchstart' in window || window.DocumentTouch && document instanceof window.DocumentTouch;
507var chrome = Webflow.env.chrome = /chrome/.test(userAgent) && /Google/.test(navigator.vendor) && parseInt(userAgent.match(/chrome\/(\d+)\./)[1], 10);
508var ios = Webflow.env.ios = /(ipod|iphone|ipad)/.test(userAgent);
509Webflow.env.safari = /safari/.test(userAgent) && !chrome && !ios; // Maintain current touch target to prevent late clicks on touch devices
510
511var touchTarget; // Listen for both events to support touch/mouse hybrid devices
512
513touch && $doc.on('touchstart mousedown', function (evt) {
514  touchTarget = evt.target;
515});
516/**
517 * Webflow.validClick - validate click target against current touch target
518 * @param  {HTMLElement} clickTarget  Element being clicked
519 * @return {Boolean}  True if click target is valid (always true on non-touch)
520 */
521
522Webflow.validClick = touch ? function (clickTarget) {
523  return clickTarget === touchTarget || $.contains(clickTarget, touchTarget);
524} : function () {
525  return true;
526};
527/**
528 * Webflow.resize, Webflow.scroll - throttled event proxies
529 */
530
531var resizeEvents = 'resize.webflow orientationchange.webflow load.webflow';
532var scrollEvents = 'scroll.webflow ' + resizeEvents;
533Webflow.resize = eventProxy($win, resizeEvents);
534Webflow.scroll = eventProxy($win, scrollEvents);
535Webflow.redraw = eventProxy(); // Create a proxy instance for throttled events
536
537function eventProxy(target, types) {
538  // Set up throttled method (using custom frame-based _.throttle)
539  var handlers = [];
540  var proxy = {};
541  proxy.up = _.throttle(function (evt) {
542    _.each(handlers, function (h) {
543      h(evt);
544    });
545  }); // Bind events to target
546
547  if (target && types) {
548    target.on(types, proxy.up);
549  }
550  /**
551   * Add an event handler
552   * @param  {function} handler
553   */
554
555
556  proxy.on = function (handler) {
557    if (typeof handler !== 'function') {
558      return;
559    }
560
561    if (_.contains(handlers, handler)) {
562      return;
563    }
564
565    handlers.push(handler);
566  };
567  /**
568   * Remove an event handler
569   * @param  {function} handler
570   */
571
572
573  proxy.off = function (handler) {
574    // If no arguments supplied, clear all handlers
575    if (!arguments.length) {
576      handlers = [];
577      return;
578    } // Otherwise, remove handler from the list
579
580
581    handlers = _.filter(handlers, function (h) {
582      return h !== handler;
583    });
584  };
585
586  return proxy;
587} // Webflow.location - Wrap window.location in api
588
589
590Webflow.location = function (url) {
591  window.location = url;
592};
593
594if (Webflow.env()) {
595  // Ignore redirects inside a Webflow design/edit environment
596  Webflow.location = function () {};
597} // Webflow.ready - Call primary and secondary handlers
598
599
600Webflow.ready = function () {
601  domready = true; // Restore modules after destroy
602
603  if (destroyed) {
604    restoreModules(); // Otherwise run primary ready methods
605  } else {
606    _.each(primary, callReady);
607  } // Run secondary ready methods
608
609
610  _.each(secondary, callReady); // Trigger resize
611
612
613  Webflow.resize.up();
614};
615
616function callReady(readyFn) {
617  isFunction(readyFn) && readyFn();
618}
619
620function restoreModules() {
621  destroyed = false;
622
623  _.each(modules, bindModule);
624}
625/**
626 * Webflow.load - Add a window load handler that will run even if load event has already happened
627 * @param  {function} handler
628 */
629
630
631var deferLoad;
632
633Webflow.load = function (handler) {
634  deferLoad.then(handler);
635};
636
637function bindLoad() {
638  // Reject any previous deferred (to support destroy)
639  if (deferLoad) {
640    deferLoad.reject();
641    $win.off('load', deferLoad.resolve);
642  } // Create deferred and bind window load event
643
644
645  deferLoad = new $.Deferred();
646  $win.on('load', deferLoad.resolve);
647} // Webflow.destroy - Trigger a destroy event for all modules
648
649
650Webflow.destroy = function (options) {
651  options = options || {};
652  destroyed = true;
653  $win.triggerHandler('__wf_destroy'); // Allow domready reset for tests
654
655  if (options.domready != null) {
656    domready = options.domready;
657  } // Unbind modules
658
659
660  _.each(modules, unbindModule); // Clear any proxy event handlers
661
662
663  Webflow.resize.off();
664  Webflow.scroll.off();
665  Webflow.redraw.off(); // Clear any queued ready methods
666
667  primary = [];
668  secondary = []; // If load event has not yet fired, replace the deferred
669
670  if (deferLoad.state() === 'pending') {
671    bindLoad();
672  }
673}; // Listen for domready
674
675
676$(Webflow.ready); // Listen for window.onload and resolve deferred
677
678bindLoad(); // Export commonjs module
679
680module.exports = window.Webflow = Webflow;
681
682/***/ }),
683/* 10 */
684/***/ (function(module, exports, __webpack_require__) {
685
686var freeGlobal = __webpack_require__(96);
687
688/** Detect free variable `self`. */
689var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
690
691/** Used as a reference to the global object. */
692var root = freeGlobal || freeSelf || Function('return this')();
693
694module.exports = root;
695
696
697/***/ }),
698/* 11 */
699/***/ (function(module, exports, __webpack_require__) {
700
701var wellKnownSymbol = __webpack_require__(5);
702var create = __webpack_require__(123);
703var hide = __webpack_require__(21);
704
705var UNSCOPABLES = wellKnownSymbol('unscopables');
706var ArrayPrototype = Array.prototype;
707
708// Array.prototype[@@unscopables]
709// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
710if (ArrayPrototype[UNSCOPABLES] == undefined) {
711  hide(ArrayPrototype, UNSCOPABLES, create(null));
712}
713
714// add a key to Array.prototype[@@unscopables]
715module.exports = function (key) {
716  ArrayPrototype[UNSCOPABLES][key] = true;
717};
718
719
720/***/ }),
721/* 12 */
vendor: 4,178 bytes, lines 722-893
722/***/ (function(module, exports) {
723
724/**
725 * Checks if `value` is the
726 * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
727 * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
728 *
729 * @static
730 * @memberOf _
731 * @since 0.1.0
732 * @category Lang
733 * @param {*} value The value to check.
734 * @returns {boolean} Returns `true` if `value` is an object, else `false`.
735 * @example
736 *
737 * _.isObject({});
738 * // => true
739 *
740 * _.isObject([1, 2, 3]);
741 * // => true
742 *
743 * _.isObject(_.noop);
744 * // => true
745 *
746 * _.isObject(null);
747 * // => false
748 */
749function isObject(value) {
750  var type = typeof value;
751  return value != null && (type == 'object' || type == 'function');
752}
753
754module.exports = isObject;
755
756
757/***/ }),
758/* 13 */
759/***/ (function(module, exports, __webpack_require__) {
760
761"use strict";
762
763var fails = __webpack_require__(8);
764
765module.exports = function (METHOD_NAME, argument) {
766  var method = [][METHOD_NAME];
767  return !method || !fails(function () {
768    // eslint-disable-next-line no-useless-call,no-throw-literal
769    method.call(null, argument || function () { throw 1; }, 1);
770  });
771};
772
773
774/***/ }),
775/* 14 */
776/***/ (function(module, exports, __webpack_require__) {
777
778var fails = __webpack_require__(8);
779
780// Thank's IE8 for his funny defineProperty
781module.exports = !fails(function () {
782  return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
783});
784
785
786/***/ }),
787/* 15 */
788/***/ (function(module, exports, __webpack_require__) {
789
790var DESCRIPTORS = __webpack_require__(14);
791var IE8_DOM_DEFINE = __webpack_require__(113);
792var anObject = __webpack_require__(27);
793var toPrimitive = __webpack_require__(76);
794
795var nativeDefineProperty = Object.defineProperty;
796
797// `Object.defineProperty` method
798// https://tc39.github.io/ecma262/#sec-object.defineproperty
799exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
800  anObject(O);
801  P = toPrimitive(P, true);
802  anObject(Attributes);
803  if (IE8_DOM_DEFINE) try {
804    return nativeDefineProperty(O, P, Attributes);
805  } catch (error) { /* empty */ }
806  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
807  if ('value' in Attributes) O[P] = Attributes.value;
808  return O;
809};
810
811
812/***/ }),
813/* 16 */
814/***/ (function(module, exports) {
815
816module.exports = function (it) {
817  return typeof it === 'object' ? it !== null : typeof it === 'function';
818};
819
820
821/***/ }),
822/* 17 */
823/***/ (function(module, exports) {
824
825var hasOwnProperty = {}.hasOwnProperty;
826
827module.exports = function (it, key) {
828  return hasOwnProperty.call(it, key);
829};
830
831
832/***/ }),
833/* 18 */
834/***/ (function(module, exports, __webpack_require__) {
835
836var baseMatches = __webpack_require__(157),
837    baseMatchesProperty = __webpack_require__(211),
838    identity = __webpack_require__(71),
839    isArray = __webpack_require__(2),
840    property = __webpack_require__(220);
841
842/**
843 * The base implementation of `_.iteratee`.
844 *
845 * @private
846 * @param {*} [value=_.identity] The value to convert to an iteratee.
847 * @returns {Function} Returns the iteratee.
848 */
849function baseIteratee(value) {
850  // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
851  // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
852  if (typeof value == 'function') {
853    return value;
854  }
855  if (value == null) {
856    return identity;
857  }
858  if (typeof value == 'object') {
859    return isArray(value)
860      ? baseMatchesProperty(value[0], value[1])
861      : baseMatches(value);
862  }
863  return property(value);
864}
865
866module.exports = baseIteratee;
867
868
869/***/ }),
870/* 19 */
871/***/ (function(module, exports, __webpack_require__) {
872
873var baseIsNative = __webpack_require__(169),
874    getValue = __webpack_require__(174);
875
876/**
877 * Gets the native function at `key` of `object`.
878 *
879 * @private
880 * @param {Object} object The object to query.
881 * @param {string} key The key of the method to get.
882 * @returns {*} Returns the function if it's native, else `undefined`.
883 */
884function getNative(object, key) {
885  var value = getValue(object, key);
886  return baseIsNative(value) ? value : undefined;
887}
888
889module.exports = getNative;
890
891
892/***/ }),
893/* 20 */
vendor: 4,266 bytes, lines 894-1036
894/***/ (function(module, exports) {
895
896/**
897 * Checks if `value` is object-like. A value is object-like if it's not `null`
898 * and has a `typeof` result of "object".
899 *
900 * @static
901 * @memberOf _
902 * @since 4.0.0
903 * @category Lang
904 * @param {*} value The value to check.
905 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
906 * @example
907 *
908 * _.isObjectLike({});
909 * // => true
910 *
911 * _.isObjectLike([1, 2, 3]);
912 * // => true
913 *
914 * _.isObjectLike(_.noop);
915 * // => false
916 *
917 * _.isObjectLike(null);
918 * // => false
919 */
920function isObjectLike(value) {
921  return value != null && typeof value == 'object';
922}
923
924module.exports = isObjectLike;
925
926
927/***/ }),
928/* 21 */
929/***/ (function(module, exports, __webpack_require__) {
930
931var DESCRIPTORS = __webpack_require__(14);
932var definePropertyModule = __webpack_require__(15);
933var createPropertyDescriptor = __webpack_require__(52);
934
935module.exports = DESCRIPTORS ? function (object, key, value) {
936  return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
937} : function (object, key, value) {
938  object[key] = value;
939  return object;
940};
941
942
943/***/ }),
944/* 22 */
945/***/ (function(module, exports, __webpack_require__) {
946
947// toObject with fallback for non-array-like ES3 strings
948var IndexedObject = __webpack_require__(53);
949var requireObjectCoercible = __webpack_require__(73);
950
951module.exports = function (it) {
952  return IndexedObject(requireObjectCoercible(it));
953};
954
955
956/***/ }),
957/* 23 */
958/***/ (function(module, exports, __webpack_require__) {
959
960var bind = __webpack_require__(54);
961var IndexedObject = __webpack_require__(53);
962var toObject = __webpack_require__(4);
963var toLength = __webpack_require__(3);
964var arraySpeciesCreate = __webpack_require__(37);
965
966var push = [].push;
967
968// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
969var createMethod = function (TYPE) {
970  var IS_MAP = TYPE == 1;
971  var IS_FILTER = TYPE == 2;
972  var IS_SOME = TYPE == 3;
973  var IS_EVERY = TYPE == 4;
974  var IS_FIND_INDEX = TYPE == 6;
975  var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
976  return function ($this, callbackfn, that, specificCreate) {
977    var O = toObject($this);
978    var self = IndexedObject(O);
979    var boundFunction = bind(callbackfn, that, 3);
980    var length = toLength(self.length);
981    var index = 0;
982    var create = specificCreate || arraySpeciesCreate;
983    var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
984    var value, result;
985    for (;length > index; index++) if (NO_HOLES || index in self) {
986      value = self[index];
987      result = boundFunction(value, index, O);
988      if (TYPE) {
989        if (IS_MAP) target[index] = result; // map
990        else if (result) switch (TYPE) {
991          case 3: return true;              // some
992          case 5: return value;             // find
993          case 6: return index;             // findIndex
994          case 2: push.call(target, value); // filter
995        } else if (IS_EVERY) return false;  // every
996      }
997    }
998    return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
999  };
1000};
1001
1002module.exports = {
1003  // `Array.prototype.forEach` method
1004  // https://tc39.github.io/ecma262/#sec-array.prototype.foreach
1005  forEach: createMethod(0),
1006  // `Array.prototype.map` method
1007  // https://tc39.github.io/ecma262/#sec-array.prototype.map
1008  map: createMethod(1),
1009  // `Array.prototype.filter` method
1010  // https://tc39.github.io/ecma262/#sec-array.prototype.filter
1011  filter: createMethod(2),
1012  // `Array.prototype.some` method
1013  // https://tc39.github.io/ecma262/#sec-array.prototype.some
1014  some: createMethod(3),
1015  // `Array.prototype.every` method
1016  // https://tc39.github.io/ecma262/#sec-array.prototype.every
1017  every: createMethod(4),
1018  // `Array.prototype.find` method
1019  // https://tc39.github.io/ecma262/#sec-array.prototype.find
1020  find: createMethod(5),
1021  // `Array.prototype.findIndex` method
1022  // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
1023  findIndex: createMethod(6)
1024};
1025
1026
1027/***/ }),
1028/* 24 */
1029/***/ (function(module, exports, __webpack_require__) {
1030
1031var Symbol = __webpack_require__(32),
1032    getRawTag = __webpack_require__(170),
1033    objectToString = __webpack_require__(171);
1034
1035/** `Object#toString` result references. */
1036var nullTag = '[object Null]',
vendor: 2,699 bytes, lines 1037-1152
1037    undefinedTag = '[object Undefined]';
1038
1039/** Built-in value references. */
1040var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1041
1042/**
1043 * The base implementation of `getTag` without fallbacks for buggy environments.
1044 *
1045 * @private
1046 * @param {*} value The value to query.
1047 * @returns {string} Returns the `toStringTag`.
1048 */
1049function baseGetTag(value) {
1050  if (value == null) {
1051    return value === undefined ? undefinedTag : nullTag;
1052  }
1053  return (symToStringTag && symToStringTag in Object(value))
1054    ? getRawTag(value)
1055    : objectToString(value);
1056}
1057
1058module.exports = baseGetTag;
1059
1060
1061/***/ }),
1062/* 25 */
1063/***/ (function(module, exports, __webpack_require__) {
1064
1065var isFunction = __webpack_require__(95),
1066    isLength = __webpack_require__(64);
1067
1068/**
1069 * Checks if `value` is array-like. A value is considered array-like if it's
1070 * not a function and has a `value.length` that's an integer greater than or
1071 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
1072 *
1073 * @static
1074 * @memberOf _
1075 * @since 4.0.0
1076 * @category Lang
1077 * @param {*} value The value to check.
1078 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
1079 * @example
1080 *
1081 * _.isArrayLike([1, 2, 3]);
1082 * // => true
1083 *
1084 * _.isArrayLike(document.body.children);
1085 * // => true
1086 *
1087 * _.isArrayLike('abc');
1088 * // => true
1089 *
1090 * _.isArrayLike(_.noop);
1091 * // => false
1092 */
1093function isArrayLike(value) {
1094  return value != null && isLength(value.length) && !isFunction(value);
1095}
1096
1097module.exports = isArrayLike;
1098
1099
1100/***/ }),
1101/* 26 */
1102/***/ (function(module, exports) {
1103
1104var ceil = Math.ceil;
1105var floor = Math.floor;
1106
1107// `ToInteger` abstract operation
1108// https://tc39.github.io/ecma262/#sec-tointeger
1109module.exports = function (argument) {
1110  return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
1111};
1112
1113
1114/***/ }),
1115/* 27 */
1116/***/ (function(module, exports, __webpack_require__) {
1117
1118var isObject = __webpack_require__(16);
1119
1120module.exports = function (it) {
1121  if (!isObject(it)) {
1122    throw TypeError(String(it) + ' is not an object');
1123  } return it;
1124};
1125
1126
1127/***/ }),
1128/* 28 */
1129/***/ (function(module, exports, __webpack_require__) {
1130
1131var classof = __webpack_require__(80);
1132
1133// `IsArray` abstract operation
1134// https://tc39.github.io/ecma262/#sec-isarray
1135module.exports = Array.isArray || function isArray(arg) {
1136  return classof(arg) == 'Array';
1137};
1138
1139
1140/***/ }),
1141/* 29 */
1142/***/ (function(module, exports, __webpack_require__) {
1143
1144"use strict";
1145
1146
1147var _interopRequireWildcard = __webpack_require__(39);
1148
1149Object.defineProperty(exports, "__esModule", {
1150  value: true
1151});
1152exports.IX2VanillaUtils = exports.IX2VanillaPlugins = exports.IX2ElementsReducer = exports.IX2EasingUtils = exports.IX2Easings = exp
1152orts.IX2BrowserSupport = void 0;
1153
1154var IX2BrowserSupport = _interopRequireWildcard(__webpack_require__(86));
1155
1156exports.IX2BrowserSupport = IX2BrowserSupport;
1157
1158var IX2Easings = _interopRequireWildcard(__webpack_require__(137));
1159
1160exports.IX2Easings = IX2Easings;
1161
1162var IX2EasingUtils = _interopRequireWildcard(__webpack_require__(139));
1163
1164exports.IX2EasingUtils = IX2EasingUtils;
1165
1166var IX2ElementsReducer = _interopRequireWildcard(__webpack_require__(316));
1167
1168exports.IX2ElementsReducer = IX2ElementsReducer;
1169
1170var IX2VanillaPlugins = _interopRequireWildcard(__webpack_require__(141));
1171
1172exports.IX2VanillaPlugins = IX2VanillaPlugins;
1173
1174var IX2VanillaUtils = _interopRequireWildcard(__webpack_require__(318));
1175
1176exports.IX2VanillaUtils = IX2VanillaUtils;
1177
1178/***/ }),
1179/* 30 */
1180/***/ (function(module, exports) {
1181
1182function _extends() {
1183  module.exports = _extends = Object.assign || function (target) {
1184    for (var i = 1; i < arguments.length; i++) {
1185      var source = arguments[i];
1186
1187      for (var key in source) {
1188        if (Object.prototype.hasOwnProperty.call(source, key)) {
1189          target[key] = source[key];
1190        }
1191      }
1192    }
1193
1194    return target;
1195  };
1196
1197  return _extends.apply(this, arguments);
1198}
1199
1200module.exports = _extends;
1201
1202/***/ }),
1203/* 31 */
1204/***/ (function(module, exports) {
1205
1206function _defineProperty(obj, key, value) {
1207  if (key in obj) {
1208    Object.defineProperty(obj, key, {
1209      value: value,
1210      enumerable: true,
1211      configurable: true,
1212      writable: true
1213    });
1214  } else {
1215    obj[key] = value;
1216  }
1217
1218  return obj;
1219}
1220
1221module.exports = _defineProperty;
1222
1223/***/ }),
1224/* 32 */
1225/***/ (function(module, exports, __webpack_require__) {
1226
1227var root = __webpack_require__(10);
1228
1229/** Built-in value references. */
1230var Symbol = root.Symbol;
1231
1232module.exports = Symbol;
1233
1234
1235/***/ }),
1236/* 33 */
1237/***/ (function(module, exports, __webpack_require__) {
1238
1239var isSymbol = __webpack_require__(50);
1240
1241/** Used as references for various `Number` constants. */
1242var INFINITY = 1 / 0;
1243
1244/**
1245 * Converts `value` to a string key if it's not a string or symbol.
1246 *
1247 * @private
1248 * @param {*} value The value to inspect.
1249 * @returns {string|symbol} Returns the key.
1250 */
1251function toKey(value) {
1252  if (typeof value == 'string' || isSymbol(value)) {
1253    return value;
1254  }
1255  var result = (value + '');
1256  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
1257}
1258
1259module.exports = toKey;
1260
1261
1262/***/ }),
1263/* 34 */
1264/***/ (function(module, exports, __webpack_require__) {
1265
1266var toInteger = __webpack_require__(26);
1267
1268var max = Math.max;
1269var min = Math.min;
1270
1271// Helper for a popular repeating case of the spec:
1272// Let integer be ? ToInteger(index).
1273// If integer < 0, let result be max((length + integer), 0); else let result be min(length, length).
1274module.exports = function (index, length) {
1275  var integer = toInteger(index);
1276  return integer < 0 ? max(integer + length, 0) : min(integer, length);
1277};
1278
1279
1280/***/ }),
1281/* 35 */
1282/***/ (function(module, exports) {
1283
1284module.exports = {};
1285
1286
1287/***/ }),
1288/* 36 */
1289/***/ (function(module, exports, __webpack_require__) {
1290
1291"use strict";
1292
1293var toPrimitive = __webpack_require__(76);
1294var definePropertyModule = __webpack_require__(15);
1295var createPropertyDescriptor = __webpack_require__(52);
1296
1297module.exports = function (object, key, value) {
1298  var propertyKey = toPrimitive(key);
1299  if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
1300  else object[propertyKey] = value;
1301};
1302
1303
1304/***/ }),
1305/* 37 */
1306/***/ (function(module, exports, __webpack_require__) {
1307
1308var isObject = __webpack_require__(16);
1309var isArray = __webpack_require__(28);
1310var wellKnownSymbol = __webpack_require__(5);
1311
1312var SPECIES = wellKnownSymbol('species');
1313
1314// `ArraySpeciesCreate` abstract operation
1315// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
1316module.exports = function (originalArray, length) {
1317  var C;
1318  if (isArray(originalArray)) {
1319    C = originalArray.constructor;
1320    // cross-realm fallback
1321    if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
1322    else if (isObject(C)) {
1323      C = C[SPECIES];
1324      if (C === null) C = undefined;
1325    }
1326  } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
1327};
1328
1329
1330/***/ }),
1331/* 38 */
1332/***/ (function(module, exports, __webpack_require__) {
1333
1334var fails = __webpack_require__(8);
1335var wellKnownSymbol = __webpack_require__(5);
1336
1337var SPECIES = wellKnownSymbol('species');
1338
1339module.exports = function (METHOD_NAME) {
1340  return !fails(function () {
1341    var array = [];
1342    var constructor = array.constructor = {};
1343    constructor[SPECIES] = function () {
1344      return { foo: 1 };
1345    };
1346    return array[METHOD_NAME](Boolean).foo !== 1;
1347  });
1348};
1349
1350
1351/***/ }),
1352/* 39 */
1353/***/ (function(module, exports) {
1354
1355function _interopRequireWildcard(obj) {
1356  if (obj && obj.__esModule) {
1357    return obj;
1358  } else {
1359    var newObj = {};
1360
1361    if (obj != null) {
1362      for (var key in obj) {
1363        if (Object.prototype.hasOwnProperty.call(obj, key)) {
1364          var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};
1365
1366          if (desc.get || desc.set) {
1367            Object.defineProperty(newObj, key, desc);
1368          } else {
1369            newObj[key] = obj[key];
1370          }
1371        }
1372      }
1373    }
1374
1375    newObj["default"] = obj;
1376    return newObj;
1377  }
1378}
1379
1380module.exports = _interopRequireWildcard;
1381
1382/***/ }),
1383/* 40 */
1384/***/ (function(module, exports, __webpack_require__) {
1385
1386"use strict";
1387
1388
1389Object.defineProperty(exports, "__esModule", {
1390  value: true
1391});
1392
1393var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1394
1395exports.clone = clone;
1396exports.addLast = addLast;
1397exports.addFirst = addFirst;
1398exports.removeLast = removeLast;
1399exports.removeFirst = removeFirst;
1400exports.insert = insert;
1401exports.removeAt = removeAt;
1402exports.replaceAt = replaceAt;
1403exports.getIn = getIn;
1404exports.set = set;
1405exports.setIn = setIn;
1406exports.update = update;
1407exports.updateIn = updateIn;
1408exports.merge = merge;
1409exports.mergeDeep = mergeDeep;
1410exports.mergeIn = mergeIn;
1411exports.omit = omit;
1412exports.addDefaults = addDefaults;
1413
1414
1415/*!
1416 * Timm
1417 *
1418 * Immutability helpers with fast reads and acceptable writes.
1419 *
1420 * @copyright Guillermo Grau Panea 2016
1421 * @license MIT
1422 */
1423
1424var INVALID_ARGS = 'INVALID_ARGS';
1425
1426// ===============================================
1427// ### Helpers
1428// ===============================================
1429
1430
1431function throwStr(msg) {
1432  throw new Error(msg);
1433}
1434
1435function getKeysAndSymbols(obj) {
1436  var keys = Object.keys(obj);
1437  if (Object.getOwnPropertySymbols) {
1438    return keys.concat(Object.getOwnPropertySymbols(obj));
1439  }
1440  return keys;
1441}
1442
1443var hasOwnProperty = {}.hasOwnProperty;
1444
1445function clone(obj) {
1446  if (Array.isArray(obj)) return obj.slice();
1447  var keys = getKeysAndSymbols(obj);
1448  var out = {};
1449  for (var i = 0; i < keys.length; i++) {
1450    var key = keys[i];
1451    out[key] = obj[key];
1452  }
1453  return out;
1454}
1455
1456function doMerge(fAddDefaults, fDeep, first) {
1457  var out = first;
1458  !(out != null) && throwStr( false ? undefined : INVALID_ARGS);
1459  var fChanged = false;
1460
1461  for (var _len = arguments.length, rest = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
1462    rest[_key - 3] = arguments[_key];
1463  }
1464
1465  for (var idx = 0; idx < rest.length; idx++) {
1466    var obj = rest[idx];
1467    if (obj == null) continue;
1468    var keys = getKeysAndSymbols(obj);
1469    if (!keys.length) continue;
1470    for (var j = 0; j <= keys.length; j++) {
1471      var key = keys[j];
1472      if (fAddDefaults && out[key] !== undefined) continue;
1473      var nextVal = obj[key];
1474      if (fDeep && isObject(out[key]) && isObject(nextVal)) {
1475        nextVal = doMerge(fAddDefaults, fDeep, out[key], nextVal);
1476      }
1477      if (nextVal === undefined || nextVal === out[key]) continue;
1478      if (!fChanged) {
1479        fChanged = true;
1480        out = clone(out);
1481      }
1482      out[key] = nextVal;
1483    }
1484  }
1485  return out;
1486}
1487
1488function isObject(o) {
1489  var type = typeof o === 'undefined' ? 'undefined' : _typeof(o);
1490  return o != null && (type === 'object' || type === 'function');
1491}
1492
1493// _deepFreeze = (obj) ->
1494//   Object.freeze obj
1495//   for key in Object.getOwnPropertyNames obj
1496//     val = obj[key]
1497//     if isObject(val) and not Object.isFrozen val
1498//       _deepFreeze val
1499//   obj
1500
1501// ===============================================
1502// -- ### Arrays
1503// ===============================================
1504
1505// -- #### addLast()
1506// -- Returns a new array with an appended item or items.
1507// --
1508// -- Usage: `addLast<T>(array: Array<T>, val: Array<T>|T): Array<T>`
1509// --
1510// -- ```js
1511// -- arr = ['a', 'b']
1512// -- arr2 = addLast(arr, 'c')
1513// -- // ['a', 'b', 'c']
1514// -- arr2 === arr
1515// -- // false
1516// -- arr3 = addLast(arr, ['c', 'd'])
1517// -- // ['a', 'b', 'c', 'd']
1518// -- ```
1519// `array.concat(val)` also handles the scalar case,
1520// but is apparently very slow
1521function addLast(array, val) {
1522  if (Array.isArray(val)) return array.concat(val);
1523  return array.concat([val]);
1524}
1525
1526// -- #### addFirst()
1527// -- Returns a new array with a prepended item or items.
1528// --
1529// -- Usage: `addFirst<T>(array: Array<T>, val: Array<T>|T): Array<T>`
1530// --
1531// -- ```js
1532// -- arr = ['a', 'b']
1533// -- arr2 = addFirst(arr, 'c')
1534// -- // ['c', 'a', 'b']
1535// -- arr2 === arr
1536// -- // false
1537// -- arr3 = addFirst(arr, ['c', 'd'])
1538// -- // ['c', 'd', 'a', 'b']
1539// -- ```
1540function addFirst(array, val) {
1541  if (Array.isArray(val)) return val.concat(array);
1542  return [val].concat(array);
1543}
1544
1545// -- #### removeLast()
1546// -- Returns a new array removing the last item.
1547// --
1548// -- Usage: `removeLast<T>(array: Array<T>): Array<T>`
1549// --
1550// -- ```js
1551// -- arr = ['a', 'b']
1552// -- arr2 = removeLast(arr)
1553// -- // ['a']
1554// -- arr2 === arr
1555// -- // false
1556// --
1557// -- // The same array is returned if there are no changes:
1558// -- arr3 = []
1559// -- removeLast(arr3) === arr3
1560// -- // true
1561// -- ```
1562function removeLast(array) {
1563  if (!array.length) return array;
1564  return array.slice(0, array.length - 1);
1565}
1566
1567// -- #### removeFirst()
1568// -- Returns a new array removing the first item.
1569// --
1570// -- Usage: `removeFirst<T>(array: Array<T>): Array<T>`
1571// --
1572// -- ```js
1573// -- arr = ['a', 'b']
1574// -- arr2 = removeFirst(arr)
1575// -- // ['b']
1576// -- arr2 === arr
1577// -- // false
1578// --
1579// -- // The same array is returned if there are no changes:
1580// -- arr3 = []
1581// -- removeFirst(arr3) === arr3
1582// -- // true
1583// -- ```
1584function removeFirst(array) {
1585  if (!array.length) return array;
1586  return array.slice(1);
1587}
1588
1589// -- #### insert()
1590// -- Returns a new array obtained by inserting an item or items
1591// -- at a specified index.
1592// --
1593// -- Usage: `insert<T>(array: Array<T>, idx: number, val: Array<T>|T): Array<T>`
1594// --
1595// -- ```js
1596// -- arr = ['a', 'b', 'c']
1597// -- arr2 = insert(arr, 1, 'd')
1598// -- // ['a', 'd', 'b', 'c']
1599// -- arr2 === arr
1600// -- // false
1601// -- insert(arr, 1, ['d', 'e'])
1602// -- // ['a', 'd', 'e', 'b', 'c']
1603// -- ```
1604function insert(array, idx, val) {
1605  return array.slice(0, idx).concat(Array.isArray(val) ? val : [val]).concat(array.slice(idx));
1606}
1607
1608// -- #### removeAt()
1609// -- Returns a new array obtained by removing an item at
1610// -- a specified index.
1611// --
1612// -- Usage: `removeAt<T>(array: Array<T>, idx: number): Array<T>`
1613// --
1614// -- ```js
1615// -- arr = ['a', 'b', 'c']
1616// -- arr2 = removeAt(arr, 1)
1617// -- // ['a', 'c']
1618// -- arr2 === arr
1619// -- // false
1620// --
1621// -- // The same array is returned if there are no changes:
1622// -- removeAt(arr, 4) === arr
1623// -- // true
1624// -- ```
1625function removeAt(array, idx) {
1626  if (idx >= array.length || idx < 0) return array;
1627  return array.slice(0, idx).concat(array.slice(idx + 1));
1628}
1629
1630// -- #### replaceAt()
1631// -- Returns a new array obtained by replacing an item at
1632// -- a specified index. If the provided item is the same as
1633// -- (*referentially equal to*) the previous item at that position,
1634// -- the original array is returned.
1635// --
1636// -- Usage: `replaceAt<T>(array: Array<T>, idx: number, newItem: T): Array<T>`
1637// --
1638// -- ```js
1639// -- arr = ['a', 'b', 'c']
1640// -- arr2 = replaceAt(arr, 1, 'd')
1641// -- // ['a', 'd', 'c']
1642// -- arr2 === arr
1643// -- // false
1644// --
1645// -- // The same object is returned if there are no changes:
1646// -- replaceAt(arr, 1, 'b') === arr
1647// -- // true
1648// -- ```
1649function replaceAt(array, idx, newItem) {
1650  if (array[idx] === newItem) return array;
1651  var len = array.length;
1652  var result = Array(len);
1653  for (var i = 0; i < len; i++) {
1654    result[i] = array[i];
1655  }
1656  result[idx] = newItem;
1657  return result;
1658}
1659
1660// ===============================================
1661// -- ### Collections (objects and arrays)
1662// ===============================================
1663// -- The following types are used throughout this section
1664// -- ```js
1665// -- type ArrayOrObject = Array<any>|Object;
1666// -- type Key = number|string;
1667// -- ```
1668
1669// -- #### getIn()
1670// -- Returns a value from an object at a given path. Works with
1671// -- nested arrays and objects. If the path does not exist, it returns
1672// -- `undefined`.
1673// --
1674// -- Usage: `getIn(obj: ?ArrayOrObject, path: Array<Key>): any`
1675// --
1676// -- ```js
1677// -- obj = { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: ['a', 'b', 'c'] }
1678// -- getIn(obj, ['d', 'd1'])
1679// -- // 3
1680// -- getIn(obj, ['e', 1])
1681// -- // 'b'
1682// -- ```
1683function getIn(obj, path) {
1684  !Array.isArray(path) && throwStr( false ? undefined : INVALID_ARGS);
1685  if (obj == null) return undefined;
1686  var ptr = obj;
1687  for (var i = 0; i < path.length; i++) {
1688    var key = path[i];
1689    ptr = ptr != null ? ptr[key] : undefined;
1690    if (ptr === undefined) return ptr;
1691  }
1692  return ptr;
1693}
1694
1695// -- #### set()
1696// -- Returns a new object with a modified attribute.
1697// -- If the provided value is the same as (*referentially equal to*)
1698// -- the previous value, the original object is returned.
1699// --
1700// -- Usage: `set<T>(obj: ?T, key: Key, val: any): T`
1701// --
1702// -- ```js
1703// -- obj = { a: 1, b: 2, c: 3 }
1704// -- obj2 = set(obj, 'b', 5)
1705// -- // { a: 1, b: 5, c: 3 }
1706// -- obj2 === obj
1707// -- // false
1708// --
1709// -- // The same object is returned if there are no changes:
1710// -- set(obj, 'b', 2) === obj
1711// -- // true
1712// -- ```
1713function set(obj, key, val) {
1714  var fallback = typeof key === 'number' ? [] : {};
1715  var finalObj = obj == null ? fallback : obj;
1716  if (finalObj[key] === val) return finalObj;
1717  var obj2 = clone(finalObj);
1718  obj2[key] = val;
1719  return obj2;
1720}
1721
1722// -- #### setIn()
1723// -- Returns a new object with a modified **nested** attribute.
1724// --
1725// -- Notes:
1726// --
1727// -- * If the provided value is the same as (*referentially equal to*)
1728// -- the previous value, the original object is returned.
1729// -- * If the path does not exist, it will be created before setting
1730// -- the new value.
1731// --
1732// -- Usage: `setIn<T: ArrayOrObject>(obj: T, path: Array<Key>, val: any): T`
1733// --
1734// -- ```js
1735// -- obj = { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }
1736// -- obj2 = setIn(obj, ['d', 'd1'], 4)
1737// -- // { a: 1, b: 2, d: { d1: 4, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }
1738// -- obj2 === obj
1739// -- // false
1740// -- obj2.d === obj.d
1741// -- // false
1742// -- obj2.e === obj.e
1743// -- // true
1744// --
1745// -- // The same object is returned if there are no changes:
1746// -- obj3 = setIn(obj, ['d', 'd1'], 3)
1747// -- // { a: 1, b: 2, d: { d1: 3, d2: 4 }, e: { e1: 'foo', e2: 'bar' } }
1748// -- obj3 === obj
1749// -- // true
1750// -- obj3.d === obj.d
1751// -- // true
1752// -- obj3.e === obj.e
1753// -- // true
1754// --
1755// -- // ... unknown paths create intermediate keys. Numeric segments are treated as array indices:
1756// -- setIn({ a: 3 }, ['unknown', 0, 'path'], 4)
1757// -- // { a: 3, unknown: [{ path: 4 }] }
1758// -- ```
1759function doSetIn(obj, path, val, idx) {
1760  var newValue = void 0;
1761  var key = path[idx];
1762  if (idx === path.length - 1) {
1763    newValue = val;
1764  } else {
1765    var nestedObj = isObject(obj) && isObject(obj[key]) ? obj[key] : typeof path[idx + 1] === 'number' ? [] : {};
1766    newValue = doSetIn(nestedObj, path, val, idx + 1);
1767  }
1768  return set(obj, key, newValue);
1769}
1770
1771function setIn(obj, path, val) {
1772  if (!path.length) return val;
1773  return doSetIn(obj, path, val, 0);
1774}
1775
1776// -- #### update()
1777// -- Returns a new object with a modified attribute,
1778// -- calculated via a user-provided callback based on the current value.
1779// -- If the calculated value is the same as (*referentially equal to*)
1780// -- the previous value, the original object is returned.
1781// --
1782// -- Usage: `update<T: ArrayOrObject>(obj: T, key: Key,
1783// -- fnUpdate: (prevValue: any) => any): T`
1784// --
1785// -- ```js
1786// -- obj = { a: 1, b: 2, c: 3 }
1787// -- obj2 = update(obj, 'b', (val) => val + 1)
1788// -- // { a: 1, b: 3, c: 3 }
1789// -- obj2 === obj
1790// -- // false
1791// --
1792// -- // The same object is returned if there are no changes:
1793// -- update(obj, 'b', (val) => val) === obj
1794// -- // true
1795// -- ```
1796function update(obj, key, fnUpdate) {
1797  var prevVal = obj == null ? undefined : obj[key];
1798  var nextVal = fnUpdate(prevVal);
1799  return set(obj, key, nextVal);
1800}
1801
1802// -- #### updateIn()
1803// -- Returns a new object with a modified **nested** attribute,
1804// -- calculated via a user-provided callback based on the current value.
1805// -- If the calculated value is the same as (*referentially equal to*)
1806// -- the previous value, the original object is returned.
1807// --
1808// -- Usage: `updateIn<T: ArrayOrObject>(obj: T, path: Array<Key>,
1809// -- fnUpdate: (prevValue: any) => any): T`
1810// --
1811// -- ```js
1812// -- obj = { a: 1, d: { d1: 3, d2: 4 } }
1813// -- obj2 = updateIn(obj, ['d', 'd1'], (val) => val + 1)
1814// -- // { a: 1, d: { d1: 4, d2: 4 } }
1815// -- obj2 === obj
1816// -- // false
1817// --
1818// -- // The same object is returned if there are no changes:
1819// -- obj3 = updateIn(obj, ['d', 'd1'], (val) => val)
1820// -- // { a: 1, d: { d1: 3, d2: 4 } }
1821// -- obj3 === obj
1822// -- // true
1823// -- ```
1824function updateIn(obj, path, fnUpdate) {
1825  var prevVal = getIn(obj, path);
1826  var nextVal = fnUpdate(prevVal);
1827  return setIn(obj, path, nextVal);
1828}
1829
1830// -- #### merge()
1831// -- Returns a new object built as follows: the overlapping keys from the
1832// -- second one overwrite the corresponding entries from the first one.
1833// -- Similar to `Object.assign()`, but immutable.
1834// --
1835// -- Usage:
1836// --
1837// -- * `merge(obj1: Object, obj2: ?Object): Object`
1838// -- * `merge(obj1: Object, ...objects: Array<?Object>): Object`
1839// --
1840// -- The unmodified `obj1` is returned if `obj2` does not *provide something
1841// -- new to* `obj1`, i.e. if either of the following
1842// -- conditions are true:
1843// --
1844// -- * `obj2` is `null` or `undefined`
1845// -- * `obj2` is an object, but it is empty
1846// -- * All attributes of `obj2` are `undefined`
1847// -- * All attributes of `obj2` are referentially equal to the
1848// --   corresponding attributes of `obj1`
1849// --
1850// -- Note that `undefined` attributes in `obj2` do not modify the
1851// -- corresponding attributes in `obj1`.
1852// --
1853// -- ```js
1854// -- obj1 = { a: 1, b: 2, c: 3 }
1855// -- obj2 = { c: 4, d: 5 }
1856// -- obj3 = merge(obj1, obj2)
1857// -- // { a: 1, b: 2, c: 4, d: 5 }
1858// -- obj3 === obj1
1859// -- // false
1860// --
1861// -- // The same object is returned if there are no changes:
1862// -- merge(obj1, { c: 3 }) === obj1
1863// -- // true
1864// -- ```
1865function merge(a, b, c, d, e, f) {
1866  for (var _len2 = arguments.length, rest = Array(_len2 > 6 ? _len2 - 6 : 0), _key2 = 6; _key2 < _len2; _key2++) {
1867    rest[_key2 - 6] = arguments[_key2];
1868  }
1869
1870  return rest.length ? doMerge.call.apply(doMerge, [null, false, false, a, b, c, d, e, f].concat(rest)) : doMerge(false, false, a, b, c, d, e, f);
1871}
1872
1873// -- #### mergeDeep()
1874// -- Returns a new object built as follows: the overlapping keys from the
1875// -- second one overwrite the corresponding entries from the first one.
1876// -- If both the first and second entries are objects they are merged recursively.
1877// -- Similar to `Object.assign()`, but immutable, and deeply merging.
1878// --
1879// -- Usage:
1880// --
1881// -- * `mergeDeep(obj1: Object, obj2: ?Object): Object`
1882// -- * `mergeDeep(obj1: Object, ...objects: Array<?Object>): Object`
1883// --
1884// -- The unmodified `obj1` is returned if `obj2` does not *provide something
1885// -- new to* `obj1`, i.e. if either of the following
1886// -- conditions are true:
1887// --
1888// -- * `obj2` is `null` or `undefined`
1889// -- * `obj2` is an object, but it is empty
1890// -- * All attributes of `obj2` are `undefined`
1891// -- * All attributes of `obj2` are referentially equal to the
1892// --   corresponding attributes of `obj1`
1893// --
1894// -- Note that `undefined` attributes in `obj2` do not modify the
1895// -- corresponding attributes in `obj1`.
1896// --
1897// -- ```js
1898// -- obj1 = { a: 1, b: 2, c: { a: 1 } }
1899// -- obj2 = { b: 3, c: { b: 2 } }
1900// -- obj3 = mergeDeep(obj1, obj2)
1901// -- // { a: 1, b: 3, c: { a: 1, b: 2 }  }
1902// -- obj3 === obj1
1903// -- // false
1904// --
1905// -- // The same object is returned if there are no changes:
1906// -- mergeDeep(obj1, { c: { a: 1 } }) === obj1
1907// -- // true
1908// -- ```
1909function mergeDeep(a, b, c, d, e, f) {
1910  for (var _len3 = arguments.length, rest = Array(_len3 > 6 ? _len3 - 6 : 0), _key3 = 6; _key3 < _len3; _key3++) {
1911    rest[_key3 - 6] = arguments[_key3];
1912  }
1913
1914  return rest.length ? doMerge.call.apply(doMerge, [null, false, true, a, b, c, d, e, f].concat(rest)) : doMerge(false, true, a, b, c, d, e, f);
1915}
1916
1917// -- #### mergeIn()
1918// -- Similar to `merge()`, but merging the value at a given nested path.
1919// -- Note that the returned type is the same as that of the first argument.
1920// --
1921// -- Usage:
1922// --
1923// -- * `mergeIn<T: ArrayOrObject>(obj1: T, path: Array<Key>, obj2: ?Object): T`
1924// -- * `mergeIn<T: ArrayOrObject>(obj1: T, path: Array<Key>,
1925// -- ...objects: Array<?Object>): T`
1926// --
1927// -- ```js
1928// -- obj1 = { a: 1, d: { b: { d1: 3, d2: 4 } } }
1929// -- obj2 = { d3: 5 }
1930// -- obj3 = mergeIn(obj1, ['d', 'b'], obj2)
1931// -- // { a: 1, d: { b: { d1: 3, d2: 4, d3: 5 } } }
1932// -- obj3 === obj1
1933// -- // false
1934// --
1935// -- // The same object is returned if there are no changes:
1936// -- mergeIn(obj1, ['d', 'b'], { d2: 4 }) === obj1
1937// -- // true
1938// -- ```
1939function mergeIn(a, path, b, c, d, e, f) {
1940  var prevVal = getIn(a, path);
1941  if (prevVal == null) prevVal = {};
1942  var nextVal = void 0;
1943
1944  for (var _len4 = arguments.length, rest = Array(_len4 > 7 ? _len4 - 7 : 0), _key4 = 7; _key4 < _len4; _key4++) {
1945    rest[_key4 - 7] = arguments[_key4];
1946  }
1947
1948  if (rest.length) {
1949    nextVal = doMerge.call.apply(doMerge, [null, false, false, prevVal, b, c, d, e, f].concat(rest));
1950  } else {
1951    nextVal = doMerge(false, false, prevVal, b, c, d, e, f);
1952  }
1953  return setIn(a, path, nextVal);
1954}
1955
1956// -- #### omit()
1957// -- Returns an object excluding one or several attributes.
1958// --
1959// -- Usage: `omit(obj: Object, attrs: Array<string>|string): Object`
1960//
1961// -- ```js
1962// -- obj = { a: 1, b: 2, c: 3, d: 4 }
1963// -- omit(obj, 'a')
1964// -- // { b: 2, c: 3, d: 4 }
1965// -- omit(obj, ['b', 'c'])
1966// -- // { a: 1, d: 4 }
1967// --
1968// -- // The same object is returned if there are no changes:
1969// -- omit(obj, 'z') === obj1
1970// -- // true
1971// -- ```
1972function omit(obj, attrs) {
1973  var omitList = Array.isArray(attrs) ? attrs : [attrs];
1974  var fDoSomething = false;
1975  for (var i = 0; i < omitList.length; i++) {
1976    if (hasOwnProperty.call(obj, omitList[i])) {
1977      fDoSomething = true;
1978      break;
1979    }
1980  }
1981  if (!fDoSomething) return obj;
1982  var out = {};
1983  var keys = getKeysAndSymbols(obj);
1984  for (var _i = 0; _i < keys.length; _i++) {
1985    var key = keys[_i];
1986    if (omitList.indexOf(key) >= 0) continue;
1987    out[key] = obj[key];
1988  }
1989  return out;
1990}
1991
1992// -- #### addDefaults()
1993// -- Returns a new object built as follows: `undefined` keys in the first one
1994// -- are filled in with the corresponding values from the second one
1995// -- (even if they are `null`).
1996// --
1997// -- Usage:
1998// --
1999// -- * `addDefaults(obj: Object, defaults: Object): Object`
2000// -- * `addDefaults(obj: Object, ...defaultObjects: Array<?Object>): Object`
2001// --
2002// -- ```js
2003// -- obj1 = { a: 1, b: 2, c: 3 }
2004// -- obj2 = { c: 4, d: 5, e: null }
2005// -- obj3 = addDefaults(obj1, obj2)
2006// -- // { a: 1, b: 2, c: 3, d: 5, e: null }
2007// -- obj3 === obj1
2008// -- // false
2009// --
2010// -- // The same object is returned if there are no changes:
2011// -- addDefaults(obj1, { c: 4 }) === obj1
2012// -- // true
2013// -- ```
2014function addDefaults(a, b, c, d, e, f) {
2015  for (var _len5 = arguments.length, rest = Array(_len5 > 6 ? _len5 - 6 : 0), _key5 = 6; _key5 < _len5; _key5++) {
2016    rest[_key5 - 6] = arguments[_key5];
2017  }
2018
2019  return rest.length ? doMerge.call.apply(doMerge, [null, true, false, a, b, c, d, e, f].concat(rest)) : doMerge(true, false, a, b, c, d, e, f);
2020}
2021
2022// ===============================================
2023// ### Public API
2024// ===============================================
2025var timm = {
2026  clone: clone,
2027  addLast: addLast,
2028  addFirst: addFirst,
2029  removeLast: removeLast,
2030  removeFirst: removeFirst,
2031  insert: insert,
2032  removeAt: removeAt,
2033  replaceAt: replaceAt,
2034
2035  getIn: getIn,
2036  // eslint-disable-next-line object-shorthand
2037  set: set, // so that flow doesn't complain
2038  setIn: setIn,
2039  update: update,
2040  updateIn: updateIn,
2041  merge: merge,
2042  mergeDeep: mergeDeep,
2043  mergeIn: mergeIn,
2044  omit: omit,
2045  addDefaults: addDefaults
2046};
2047
2048exports.default = timm;
2049
2050
2051/***/ }),
2052/* 41 */
vendor: 6,153 bytes, lines 2053-2300
2053/***/ (function(module, exports) {
2054
2055function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); }
2056
2057function _typeof(obj) {
2058  if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") {
2059    module.exports = _typeof = function _typeof(obj) {
2060      return _typeof2(obj);
2061    };
2062  } else {
2063    module.exports = _typeof = function _typeof(obj) {
2064      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj);
2065    };
2066  }
2067
2068  return _typeof(obj);
2069}
2070
2071module.exports = _typeof;
2072
2073/***/ }),
2074/* 42 */
2075/***/ (function(module, exports, __webpack_require__) {
2076
2077var listCacheClear = __webpack_require__(159),
2078    listCacheDelete = __webpack_require__(160),
2079    listCacheGet = __webpack_require__(161),
2080    listCacheHas = __webpack_require__(162),
2081    listCacheSet = __webpack_require__(163);
2082
2083/**
2084 * Creates an list cache object.
2085 *
2086 * @private
2087 * @constructor
2088 * @param {Array} [entries] The key-value pairs to cache.
2089 */
2090function ListCache(entries) {
2091  var index = -1,
2092      length = entries == null ? 0 : entries.length;
2093
2094  this.clear();
2095  while (++index < length) {
2096    var entry = entries[index];
2097    this.set(entry[0], entry[1]);
2098  }
2099}
2100
2101// Add methods to `ListCache`.
2102ListCache.prototype.clear = listCacheClear;
2103ListCache.prototype['delete'] = listCacheDelete;
2104ListCache.prototype.get = listCacheGet;
2105ListCache.prototype.has = listCacheHas;
2106ListCache.prototype.set = listCacheSet;
2107
2108module.exports = ListCache;
2109
2110
2111/***/ }),
2112/* 43 */
2113/***/ (function(module, exports, __webpack_require__) {
2114
2115var eq = __webpack_require__(57);
2116
2117/**
2118 * Gets the index at which the `key` is found in `array` of key-value pairs.
2119 *
2120 * @private
2121 * @param {Array} array The array to inspect.
2122 * @param {*} key The key to search for.
2123 * @returns {number} Returns the index of the matched value, else `-1`.
2124 */
2125function assocIndexOf(array, key) {
2126  var length = array.length;
2127  while (length--) {
2128    if (eq(array[length][0], key)) {
2129      return length;
2130    }
2131  }
2132  return -1;
2133}
2134
2135module.exports = assocIndexOf;
2136
2137
2138/***/ }),
2139/* 44 */
2140/***/ (function(module, exports) {
2141
2142var g;
2143
2144// This works in non-strict mode
2145g = (function() {
2146	return this;
2147})();
2148
2149try {
2150	// This works if eval is allowed (see CSP)
2151	g = g || new Function("return this")();
2152} catch (e) {
2153	// This works if the window reference is available
2154	if (typeof window === "object") g = window;
2155}
2156
2157// g can still be undefined, but nothing to do about it...
2158// We return undefined, instead of nothing here, so it's
2159// easier to handle this case. if(!global) { ...}
2160
2161module.exports = g;
2162
2163
2164/***/ }),
2165/* 45 */
2166/***/ (function(module, exports, __webpack_require__) {
2167
2168var getNative = __webpack_require__(19);
2169
2170/* Built-in method references that are verified to be native. */
2171var nativeCreate = getNative(Object, 'create');
2172
2173module.exports = nativeCreate;
2174
2175
2176/***/ }),
2177/* 46 */
2178/***/ (function(module, exports, __webpack_require__) {
2179
2180var isKeyable = __webpack_require__(183);
2181
2182/**
2183 * Gets the data for `map`.
2184 *
2185 * @private
2186 * @param {Object} map The map to query.
2187 * @param {string} key The reference key.
2188 * @returns {*} Returns the map data.
2189 */
2190function getMapData(map, key) {
2191  var data = map.__data__;
2192  return isKeyable(key)
2193    ? data[typeof key == 'string' ? 'string' : 'hash']
2194    : data.map;
2195}
2196
2197module.exports = getMapData;
2198
2199
2200/***/ }),
2201/* 47 */
2202/***/ (function(module, exports, __webpack_require__) {
2203
2204var arrayLikeKeys = __webpack_require__(103),
2205    baseKeys = __webpack_require__(65),
2206    isArrayLike = __webpack_require__(25);
2207
2208/**
2209 * Creates an array of the own enumerable property names of `object`.
2210 *
2211 * **Note:** Non-object values are coerced to objects. See the
2212 * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
2213 * for more details.
2214 *
2215 * @static
2216 * @since 0.1.0
2217 * @memberOf _
2218 * @category Object
2219 * @param {Object} object The object to query.
2220 * @returns {Array} Returns the array of property names.
2221 * @example
2222 *
2223 * function Foo() {
2224 *   this.a = 1;
2225 *   this.b = 2;
2226 * }
2227 *
2228 * Foo.prototype.c = 3;
2229 *
2230 * _.keys(new Foo);
2231 * // => ['a', 'b'] (iteration order is not guaranteed)
2232 *
2233 * _.keys('hi');
2234 * // => ['0', '1']
2235 */
2236function keys(object) {
2237  return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
2238}
2239
2240module.exports = keys;
2241
2242
2243/***/ }),
2244/* 48 */
2245/***/ (function(module, exports, __webpack_require__) {
2246
2247var baseIsArguments = __webpack_require__(201),
2248    isObjectLike = __webpack_require__(20);
2249
2250/** Used for built-in method references. */
2251var objectProto = Object.prototype;
2252
2253/** Used to check objects for own properties. */
2254var hasOwnProperty = objectProto.hasOwnProperty;
2255
2256/** Built-in value references. */
2257var propertyIsEnumerable = objectProto.propertyIsEnumerable;
2258
2259/**
2260 * Checks if `value` is likely an `arguments` object.
2261 *
2262 * @static
2263 * @memberOf _
2264 * @since 0.1.0
2265 * @category Lang
2266 * @param {*} value The value to check.
2267 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2268 *  else `false`.
2269 * @example
2270 *
2271 * _.isArguments(function() { return arguments; }());
2272 * // => true
2273 *
2274 * _.isArguments([1, 2, 3]);
2275 * // => false
2276 */
2277var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
2278  return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
2279    !propertyIsEnumerable.call(value, 'callee');
2280};
2281
2282module.exports = isArguments;
2283
2284
2285/***/ }),
2286/* 49 */
2287/***/ (function(module, exports, __webpack_require__) {
2288
2289var isArray = __webpack_require__(2),
2290    isKey = __webpack_require__(70),
2291    stringToPath = __webpack_require__(212),
2292    toString = __webpack_require__(215);
2293
2294/**
2295 * Casts `value` to a path array if it's not one.
2296 *
2297 * @private
2298 * @param {*} value The value to inspect.
2299 * @param {Object} [object] The object to query keys on.
2300 * @returns {Array} Returns the cast property path array.
vendor: 3,231 bytes, lines 2301-2445
2301 */
2302function castPath(value, object) {
2303  if (isArray(value)) {
2304    return value;
2305  }
2306  return isKey(value, object) ? [value] : stringToPath(toString(value));
2307}
2308
2309module.exports = castPath;
2310
2311
2312/***/ }),
2313/* 50 */
2314/***/ (function(module, exports, __webpack_require__) {
2315
2316var baseGetTag = __webpack_require__(24),
2317    isObjectLike = __webpack_require__(20);
2318
2319/** `Object#toString` result references. */
2320var symbolTag = '[object Symbol]';
2321
2322/**
2323 * Checks if `value` is classified as a `Symbol` primitive or object.
2324 *
2325 * @static
2326 * @memberOf _
2327 * @since 4.0.0
2328 * @category Lang
2329 * @param {*} value The value to check.
2330 * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
2331 * @example
2332 *
2333 * _.isSymbol(Symbol.iterator);
2334 * // => true
2335 *
2336 * _.isSymbol('abc');
2337 * // => false
2338 */
2339function isSymbol(value) {
2340  return typeof value == 'symbol' ||
2341    (isObjectLike(value) && baseGetTag(value) == symbolTag);
2342}
2343
2344module.exports = isSymbol;
2345
2346
2347/***/ }),
2348/* 51 */
2349/***/ (function(module, exports, __webpack_require__) {
2350
2351var global = __webpack_require__(7);
2352var setGlobal = __webpack_require__(75);
2353var IS_PURE = __webpack_require__(77);
2354
2355var SHARED = '__core-js_shared__';
2356var store = global[SHARED] || setGlobal(SHARED, {});
2357
2358(module.exports = function (key, value) {
2359  return store[key] || (store[key] = value !== undefined ? value : {});
2360})('versions', []).push({
2361  version: '3.1.3',
2362  mode: IS_PURE ? 'pure' : 'global',
2363  copyright: '© 2019 Denis Pushkarev (zloirock.ru)'
2364});
2365
2366
2367/***/ }),
2368/* 52 */
2369/***/ (function(module, exports) {
2370
2371module.exports = function (bitmap, value) {
2372  return {
2373    enumerable: !(bitmap & 1),
2374    configurable: !(bitmap & 2),
2375    writable: !(bitmap & 4),
2376    value: value
2377  };
2378};
2379
2380
2381/***/ }),
2382/* 53 */
2383/***/ (function(module, exports, __webpack_require__) {
2384
2385var fails = __webpack_require__(8);
2386var classof = __webpack_require__(80);
2387
2388var split = ''.split;
2389
2390// fallback for non-array-like ES3 and non-enumerable old V8 strings
2391module.exports = fails(function () {
2392  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
2393  // eslint-disable-next-line no-prototype-builtins
2394  return !Object('z').propertyIsEnumerable(0);
2395}) ? function (it) {
2396  return classof(it) == 'String' ? split.call(it, '') : Object(it);
2397} : Object;
2398
2399
2400/***/ }),
2401/* 54 */
2402/***/ (function(module, exports, __webpack_require__) {
2403
2404var aFunction = __webpack_require__(55);
2405
2406// optional / simple context binding
2407module.exports = function (fn, that, length) {
2408  aFunction(fn);
2409  if (that === undefined) return fn;
2410  switch (length) {
2411    case 0: return function () {
2412      return fn.call(that);
2413    };
2414    case 1: return function (a) {
2415      return fn.call(that, a);
2416    };
2417    case 2: return function (a, b) {
2418      return fn.call(that, a, b);
2419    };
2420    case 3: return function (a, b, c) {
2421      return fn.call(that, a, b, c);
2422    };
2423  }
2424  return function (/* ...args */) {
2425    return fn.apply(that, arguments);
2426  };
2427};
2428
2429
2430/***/ }),
2431/* 55 */
2432/***/ (function(module, exports) {
2433
2434module.exports = function (it) {
2435  if (typeof it != 'function') {
2436    throw TypeError(String(it) + ' is not a function');
2437  } return it;
2438};
2439
2440
2441/***/ }),
2442/* 56 */
2443/***/ (function(module, exports, __webpack_require__) {
2444
2445"use strict";
vendor: 10,229 bytes, lines 2446-2865
2446// @wf-will-never-add-flow-to-this-file
2447
2448/* globals window, document */
2449
2450/* eslint-disable no-var */
2451// eslint-disable-next-line strict
2452
2453
2454var IXEvents = __webpack_require__(287);
2455
2456function dispatchCustomEvent(element, eventName) {
2457  var event = document.createEvent('CustomEvent');
2458  event.initCustomEvent(eventName, true, true, null);
2459  element.dispatchEvent(event);
2460}
2461/**
2462 * Webflow: IX Event triggers for other modules
2463 */
2464
2465
2466var $ = window.jQuery;
2467var api = {};
2468var namespace = '.w-ix';
2469var eventTriggers = {
2470  reset: function reset(i, el) {
2471    IXEvents.triggers.reset(i, el);
2472  },
2473  intro: function intro(i, el) {
2474    IXEvents.triggers.intro(i, el);
2475    dispatchCustomEvent(el, 'COMPONENT_ACTIVE');
2476  },
2477  outro: function outro(i, el) {
2478    IXEvents.triggers.outro(i, el);
2479    dispatchCustomEvent(el, 'COMPONENT_INACTIVE');
2480  }
2481};
2482api.triggers = {};
2483api.types = {
2484  INTRO: 'w-ix-intro' + namespace,
2485  OUTRO: 'w-ix-outro' + namespace
2486};
2487$.extend(api.triggers, eventTriggers);
2488module.exports = api;
2489
2490/***/ }),
2491/* 57 */
2492/***/ (function(module, exports) {
2493
2494/**
2495 * Performs a
2496 * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2497 * comparison between two values to determine if they are equivalent.
2498 *
2499 * @static
2500 * @memberOf _
2501 * @since 4.0.0
2502 * @category Lang
2503 * @param {*} value The value to compare.
2504 * @param {*} other The other value to compare.
2505 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2506 * @example
2507 *
2508 * var object = { 'a': 1 };
2509 * var other = { 'a': 1 };
2510 *
2511 * _.eq(object, object);
2512 * // => true
2513 *
2514 * _.eq(object, other);
2515 * // => false
2516 *
2517 * _.eq('a', 'a');
2518 * // => true
2519 *
2520 * _.eq('a', Object('a'));
2521 * // => false
2522 *
2523 * _.eq(NaN, NaN);
2524 * // => true
2525 */
2526function eq(value, other) {
2527  return value === other || (value !== value && other !== other);
2528}
2529
2530module.exports = eq;
2531
2532
2533/***/ }),
2534/* 58 */
2535/***/ (function(module, exports, __webpack_require__) {
2536
2537var getNative = __webpack_require__(19),
2538    root = __webpack_require__(10);
2539
2540/* Built-in method references that are verified to be native. */
2541var Map = getNative(root, 'Map');
2542
2543module.exports = Map;
2544
2545
2546/***/ }),
2547/* 59 */
2548/***/ (function(module, exports, __webpack_require__) {
2549
2550var mapCacheClear = __webpack_require__(175),
2551    mapCacheDelete = __webpack_require__(182),
2552    mapCacheGet = __webpack_require__(184),
2553    mapCacheHas = __webpack_require__(185),
2554    mapCacheSet = __webpack_require__(186);
2555
2556/**
2557 * Creates a map cache object to store key-value pairs.
2558 *
2559 * @private
2560 * @constructor
2561 * @param {Array} [entries] The key-value pairs to cache.
2562 */
2563function MapCache(entries) {
2564  var index = -1,
2565      length = entries == null ? 0 : entries.length;
2566
2567  this.clear();
2568  while (++index < length) {
2569    var entry = entries[index];
2570    this.set(entry[0], entry[1]);
2571  }
2572}
2573
2574// Add methods to `MapCache`.
2575MapCache.prototype.clear = mapCacheClear;
2576MapCache.prototype['delete'] = mapCacheDelete;
2577MapCache.prototype.get = mapCacheGet;
2578MapCache.prototype.has = mapCacheHas;
2579MapCache.prototype.set = mapCacheSet;
2580
2581module.exports = MapCache;
2582
2583
2584/***/ }),
2585/* 60 */
2586/***/ (function(module, exports) {
2587
2588/**
2589 * Appends the elements of `values` to `array`.
2590 *
2591 * @private
2592 * @param {Array} array The array to modify.
2593 * @param {Array} values The values to append.
2594 * @returns {Array} Returns `array`.
2595 */
2596function arrayPush(array, values) {
2597  var index = -1,
2598      length = values.length,
2599      offset = array.length;
2600
2601  while (++index < length) {
2602    array[offset + index] = values[index];
2603  }
2604  return array;
2605}
2606
2607module.exports = arrayPush;
2608
2609
2610/***/ }),
2611/* 61 */
2612/***/ (function(module, exports, __webpack_require__) {
2613
2614/* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(10),
2615    stubFalse = __webpack_require__(202);
2616
2617/** Detect free variable `exports`. */
2618var freeExports =  true && exports && !exports.nodeType && exports;
2619
2620/** Detect free variable `module`. */
2621var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
2622
2623/** Detect the popular CommonJS extension `module.exports`. */
2624var moduleExports = freeModule && freeModule.exports === freeExports;
2625
2626/** Built-in value references. */
2627var Buffer = moduleExports ? root.Buffer : undefined;
2628
2629/* Built-in method references for those with the same name as other `lodash` methods. */
2630var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;
2631
2632/**
2633 * Checks if `value` is a buffer.
2634 *
2635 * @static
2636 * @memberOf _
2637 * @since 4.3.0
2638 * @category Lang
2639 * @param {*} value The value to check.
2640 * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
2641 * @example
2642 *
2643 * _.isBuffer(new Buffer(2));
2644 * // => true
2645 *
2646 * _.isBuffer(new Uint8Array(2));
2647 * // => false
2648 */
2649var isBuffer = nativeIsBuffer || stubFalse;
2650
2651module.exports = isBuffer;
2652
2653/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(104)(module)))
2654
2655/***/ }),
2656/* 62 */
2657/***/ (function(module, exports) {
2658
2659/** Used as references for various `Number` constants. */
2660var MAX_SAFE_INTEGER = 9007199254740991;
2661
2662/** Used to detect unsigned integer values. */
2663var reIsUint = /^(?:0|[1-9]\d*)$/;
2664
2665/**
2666 * Checks if `value` is a valid array-like index.
2667 *
2668 * @private
2669 * @param {*} value The value to check.
2670 * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2671 * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2672 */
2673function isIndex(value, length) {
2674  var type = typeof value;
2675  length = length == null ? MAX_SAFE_INTEGER : length;
2676
2677  return !!length &&
2678    (type == 'number' ||
2679      (type != 'symbol' && reIsUint.test(value))) &&
2680        (value > -1 && value % 1 == 0 && value < length);
2681}
2682
2683module.exports = isIndex;
2684
2685
2686/***/ }),
2687/* 63 */
2688/***/ (function(module, exports, __webpack_require__) {
2689
2690var baseIsTypedArray = __webpack_require__(203),
2691    baseUnary = __webpack_require__(204),
2692    nodeUtil = __webpack_require__(205);
2693
2694/* Node.js helper references. */
2695var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
2696
2697/**
2698 * Checks if `value` is classified as a typed array.
2699 *
2700 * @static
2701 * @memberOf _
2702 * @since 3.0.0
2703 * @category Lang
2704 * @param {*} value The value to check.
2705 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2706 * @example
2707 *
2708 * _.isTypedArray(new Uint8Array);
2709 * // => true
2710 *
2711 * _.isTypedArray([]);
2712 * // => false
2713 */
2714var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2715
2716module.exports = isTypedArray;
2717
2718
2719/***/ }),
2720/* 64 */
2721/***/ (function(module, exports) {
2722
2723/** Used as references for various `Number` constants. */
2724var MAX_SAFE_INTEGER = 9007199254740991;
2725
2726/**
2727 * Checks if `value` is a valid array-like length.
2728 *
2729 * **Note:** This method is loosely based on
2730 * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2731 *
2732 * @static
2733 * @memberOf _
2734 * @since 4.0.0
2735 * @category Lang
2736 * @param {*} value The value to check.
2737 * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2738 * @example
2739 *
2740 * _.isLength(3);
2741 * // => true
2742 *
2743 * _.isLength(Number.MIN_VALUE);
2744 * // => false
2745 *
2746 * _.isLength(Infinity);
2747 * // => false
2748 *
2749 * _.isLength('3');
2750 * // => false
2751 */
2752function isLength(value) {
2753  return typeof value == 'number' &&
2754    value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2755}
2756
2757module.exports = isLength;
2758
2759
2760/***/ }),
2761/* 65 */
2762/***/ (function(module, exports, __webpack_require__) {
2763
2764var isPrototype = __webpack_require__(66),
2765    nativeKeys = __webpack_require__(206);
2766
2767/** Used for built-in method references. */
2768var objectProto = Object.prototype;
2769
2770/** Used to check objects for own properties. */
2771var hasOwnProperty = objectProto.hasOwnProperty;
2772
2773/**
2774 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
2775 *
2776 * @private
2777 * @param {Object} object The object to query.
2778 * @returns {Array} Returns the array of property names.
2779 */
2780function baseKeys(object) {
2781  if (!isPrototype(object)) {
2782    return nativeKeys(object);
2783  }
2784  var result = [];
2785  for (var key in Object(object)) {
2786    if (hasOwnProperty.call(object, key) && key != 'constructor') {
2787      result.push(key);
2788    }
2789  }
2790  return result;
2791}
2792
2793module.exports = baseKeys;
2794
2795
2796/***/ }),
2797/* 66 */
2798/***/ (function(module, exports) {
2799
2800/** Used for built-in method references. */
2801var objectProto = Object.prototype;
2802
2803/**
2804 * Checks if `value` is likely a prototype object.
2805 *
2806 * @private
2807 * @param {*} value The value to check.
2808 * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2809 */
2810function isPrototype(value) {
2811  var Ctor = value && value.constructor,
2812      proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2813
2814  return value === proto;
2815}
2816
2817module.exports = isPrototype;
2818
2819
2820/***/ }),
2821/* 67 */
2822/***/ (function(module, exports, __webpack_require__) {
2823
2824var DataView = __webpack_require__(207),
2825    Map = __webpack_require__(58),
2826    Promise = __webpack_require__(208),
2827    Set = __webpack_require__(209),
2828    WeakMap = __webpack_require__(106),
2829    baseGetTag = __webpack_require__(24),
2830    toSource = __webpack_require__(97);
2831
2832/** `Object#toString` result references. */
2833var mapTag = '[object Map]',
2834    objectTag = '[object Object]',
2835    promiseTag = '[object Promise]',
2836    setTag = '[object Set]',
2837    weakMapTag = '[object WeakMap]';
2838
2839var dataViewTag = '[object DataView]';
2840
2841/** Used to detect maps, sets, and weakmaps. */
2842var dataViewCtorString = toSource(DataView),
2843    mapCtorString = toSource(Map),
2844    promiseCtorString = toSource(Promise),
2845    setCtorString = toSource(Set),
2846    weakMapCtorString = toSource(WeakMap);
2847
2848/**
2849 * Gets the `toStringTag` of `value`.
2850 *
2851 * @private
2852 * @param {*} value The value to query.
2853 * @returns {string} Returns the `toStringTag`.
2854 */
2855var getTag = baseGetTag;
2856
2857// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2858if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
2859    (Map && getTag(new Map) != mapTag) ||
2860    (Promise && getTag(Promise.resolve()) != promiseTag) ||
2861    (Set && getTag(new Set) != setTag) ||
2862    (WeakMap && getTag(new WeakMap) != weakMapTag)) {
2863  getTag = function(value) {
2864    var result = baseGetTag(value),
2865        Ctor = result == objectTag ? value.constructor : undefined,
vendor: 5,083 bytes, lines 2866-3086
2866        ctorString = Ctor ? toSource(Ctor) : '';
2867
2868    if (ctorString) {
2869      switch (ctorString) {
2870        case dataViewCtorString: return dataViewTag;
2871        case mapCtorString: return mapTag;
2872        case promiseCtorString: return promiseTag;
2873        case setCtorString: return setTag;
2874        case weakMapCtorString: return weakMapTag;
2875      }
2876    }
2877    return result;
2878  };
2879}
2880
2881module.exports = getTag;
2882
2883
2884/***/ }),
2885/* 68 */
2886/***/ (function(module, exports, __webpack_require__) {
2887
2888var baseGet = __webpack_require__(69);
2889
2890/**
2891 * Gets the value at `path` of `object`. If the resolved value is
2892 * `undefined`, the `defaultValue` is returned in its place.
2893 *
2894 * @static
2895 * @memberOf _
2896 * @since 3.7.0
2897 * @category Object
2898 * @param {Object} object The object to query.
2899 * @param {Array|string} path The path of the property to get.
2900 * @param {*} [defaultValue] The value returned for `undefined` resolved values.
2901 * @returns {*} Returns the resolved value.
2902 * @example
2903 *
2904 * var object = { 'a': [{ 'b': { 'c': 3 } }] };
2905 *
2906 * _.get(object, 'a[0].b.c');
2907 * // => 3
2908 *
2909 * _.get(object, ['a', '0', 'b', 'c']);
2910 * // => 3
2911 *
2912 * _.get(object, 'a.b.c', 'default');
2913 * // => 'default'
2914 */
2915function get(object, path, defaultValue) {
2916  var result = object == null ? undefined : baseGet(object, path);
2917  return result === undefined ? defaultValue : result;
2918}
2919
2920module.exports = get;
2921
2922
2923/***/ }),
2924/* 69 */
2925/***/ (function(module, exports, __webpack_require__) {
2926
2927var castPath = __webpack_require__(49),
2928    toKey = __webpack_require__(33);
2929
2930/**
2931 * The base implementation of `_.get` without support for default values.
2932 *
2933 * @private
2934 * @param {Object} object The object to query.
2935 * @param {Array|string} path The path of the property to get.
2936 * @returns {*} Returns the resolved value.
2937 */
2938function baseGet(object, path) {
2939  path = castPath(path, object);
2940
2941  var index = 0,
2942      length = path.length;
2943
2944  while (object != null && index < length) {
2945    object = object[toKey(path[index++])];
2946  }
2947  return (index && index == length) ? object : undefined;
2948}
2949
2950module.exports = baseGet;
2951
2952
2953/***/ }),
2954/* 70 */
2955/***/ (function(module, exports, __webpack_require__) {
2956
2957var isArray = __webpack_require__(2),
2958    isSymbol = __webpack_require__(50);
2959
2960/** Used to match property names within property paths. */
2961var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
2962    reIsPlainProp = /^\w*$/;
2963
2964/**
2965 * Checks if `value` is a property name and not a property path.
2966 *
2967 * @private
2968 * @param {*} value The value to check.
2969 * @param {Object} [object] The object to query keys on.
2970 * @returns {boolean} Returns `true` if `value` is a property name, else `false`.
2971 */
2972function isKey(value, object) {
2973  if (isArray(value)) {
2974    return false;
2975  }
2976  var type = typeof value;
2977  if (type == 'number' || type == 'symbol' || type == 'boolean' ||
2978      value == null || isSymbol(value)) {
2979    return true;
2980  }
2981  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
2982    (object != null && value in Object(object));
2983}
2984
2985module.exports = isKey;
2986
2987
2988/***/ }),
2989/* 71 */
2990/***/ (function(module, exports) {
2991
2992/**
2993 * This method returns the first argument it receives.
2994 *
2995 * @static
2996 * @since 0.1.0
2997 * @memberOf _
2998 * @category Util
2999 * @param {*} value Any value.
3000 * @returns {*} Returns `value`.
3001 * @example
3002 *
3003 * var object = { 'a': 1 };
3004 *
3005 * console.log(_.identity(object) === object);
3006 * // => true
3007 */
3008function identity(value) {
3009  return value;
3010}
3011
3012module.exports = identity;
3013
3014
3015/***/ }),
3016/* 72 */
3017/***/ (function(module, exports, __webpack_require__) {
3018
3019var baseTrim = __webpack_require__(223),
3020    isObject = __webpack_require__(12),
3021    isSymbol = __webpack_require__(50);
3022
3023/** Used as references for various `Number` constants. */
3024var NAN = 0 / 0;
3025
3026/** Used to detect bad signed hexadecimal string values. */
3027var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
3028
3029/** Used to detect binary string values. */
3030var reIsBinary = /^0b[01]+$/i;
3031
3032/** Used to detect octal string values. */
3033var reIsOctal = /^0o[0-7]+$/i;
3034
3035/** Built-in method references without a dependency on `root`. */
3036var freeParseInt = parseInt;
3037
3038/**
3039 * Converts `value` to a number.
3040 *
3041 * @static
3042 * @memberOf _
3043 * @since 4.0.0
3044 * @category Lang
3045 * @param {*} value The value to process.
3046 * @returns {number} Returns the number.
3047 * @example
3048 *
3049 * _.toNumber(3.2);
3050 * // => 3.2
3051 *
3052 * _.toNumber(Number.MIN_VALUE);
3053 * // => 5e-324
3054 *
3055 * _.toNumber(Infinity);
3056 * // => Infinity
3057 *
3058 * _.toNumber('3.2');
3059 * // => 3.2
3060 */
3061function toNumber(value) {
3062  if (typeof value == 'number') {
3063    return value;
3064  }
3065  if (isSymbol(value)) {
3066    return NAN;
3067  }
3068  if (isObject(value)) {
3069    var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
3070    value = isObject(other) ? (other + '') : other;
3071  }
3072  if (typeof value != 'string') {
3073    return value === 0 ? value : +value;
3074  }
3075  value = baseTrim(value);
3076  var isBinary = reIsBinary.test(value);
3077  return (isBinary || reIsOctal.test(value))
3078    ? freeParseInt(value.slice(2), isBinary ? 2 : 8)
3079    : (reIsBadHex.test(value) ? NAN : +value);
3080}
3081
3082module.exports = toNumber;
3083
3084
3085/***/ }),
3086/* 73 */
vendor: 4,106 bytes, lines 3087-3260
3087/***/ (function(module, exports) {
3088
3089// `RequireObjectCoercible` abstract operation
3090// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
3091module.exports = function (it) {
3092  if (it == undefined) throw TypeError("Can't call method on " + it);
3093  return it;
3094};
3095
3096
3097/***/ }),
3098/* 74 */
3099/***/ (function(module, exports, __webpack_require__) {
3100
3101var NATIVE_WEAK_MAP = __webpack_require__(229);
3102var global = __webpack_require__(7);
3103var isObject = __webpack_require__(16);
3104var hide = __webpack_require__(21);
3105var objectHas = __webpack_require__(17);
3106var sharedKey = __webpack_require__(78);
3107var hiddenKeys = __webpack_require__(79);
3108
3109var WeakMap = global.WeakMap;
3110var set, get, has;
3111
3112var enforce = function (it) {
3113  return has(it) ? get(it) : set(it, {});
3114};
3115
3116var getterFor = function (TYPE) {
3117  return function (it) {
3118    var state;
3119    if (!isObject(it) || (state = get(it)).type !== TYPE) {
3120      throw TypeError('Incompatible receiver, ' + TYPE + ' required');
3121    } return state;
3122  };
3123};
3124
3125if (NATIVE_WEAK_MAP) {
3126  var store = new WeakMap();
3127  var wmget = store.get;
3128  var wmhas = store.has;
3129  var wmset = store.set;
3130  set = function (it, metadata) {
3131    wmset.call(store, it, metadata);
3132    return metadata;
3133  };
3134  get = function (it) {
3135    return wmget.call(store, it) || {};
3136  };
3137  has = function (it) {
3138    return wmhas.call(store, it);
3139  };
3140} else {
3141  var STATE = sharedKey('state');
3142  hiddenKeys[STATE] = true;
3143  set = function (it, metadata) {
3144    hide(it, STATE, metadata);
3145    return metadata;
3146  };
3147  get = function (it) {
3148    return objectHas(it, STATE) ? it[STATE] : {};
3149  };
3150  has = function (it) {
3151    return objectHas(it, STATE);
3152  };
3153}
3154
3155module.exports = {
3156  set: set,
3157  get: get,
3158  has: has,
3159  enforce: enforce,
3160  getterFor: getterFor
3161};
3162
3163
3164/***/ }),
3165/* 75 */
3166/***/ (function(module, exports, __webpack_require__) {
3167
3168var global = __webpack_require__(7);
3169var hide = __webpack_require__(21);
3170
3171module.exports = function (key, value) {
3172  try {
3173    hide(global, key, value);
3174  } catch (error) {
3175    global[key] = value;
3176  } return value;
3177};
3178
3179
3180/***/ }),
3181/* 76 */
3182/***/ (function(module, exports, __webpack_require__) {
3183
3184var isObject = __webpack_require__(16);
3185
3186// `ToPrimitive` abstract operation
3187// https://tc39.github.io/ecma262/#sec-toprimitive
3188// instead of the ES6 spec version, we didn't implement @@toPrimitive case
3189// and the second argument - flag - preferred type is a string
3190module.exports = function (input, PREFERRED_STRING) {
3191  if (!isObject(input)) return input;
3192  var fn, val;
3193  if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
3194  if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
3195  if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
3196  throw TypeError("Can't convert object to primitive value");
3197};
3198
3199
3200/***/ }),
3201/* 77 */
3202/***/ (function(module, exports) {
3203
3204module.exports = false;
3205
3206
3207/***/ }),
3208/* 78 */
3209/***/ (function(module, exports, __webpack_require__) {
3210
3211var shared = __webpack_require__(51);
3212var uid = __webpack_require__(115);
3213
3214var keys = shared('keys');
3215
3216module.exports = function (key) {
3217  return keys[key] || (keys[key] = uid(key));
3218};
3219
3220
3221/***/ }),
3222/* 79 */
3223/***/ (function(module, exports) {
3224
3225module.exports = {};
3226
3227
3228/***/ }),
3229/* 80 */
3230/***/ (function(module, exports) {
3231
3232var toString = {}.toString;
3233
3234module.exports = function (it) {
3235  return toString.call(it).slice(8, -1);
3236};
3237
3238
3239/***/ }),
3240/* 81 */
3241/***/ (function(module, exports, __webpack_require__) {
3242
3243var path = __webpack_require__(119);
3244var global = __webpack_require__(7);
3245
3246var aFunction = function (variable) {
3247  return typeof variable == 'function' ? variable : undefined;
3248};
3249
3250module.exports = function (namespace, method) {
3251  return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
3252    : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
3253};
3254
3255
3256/***/ }),
3257/* 82 */
3258/***/ (function(module, exports, __webpack_require__) {
3259
3260var toIndexedObject = __webpack_require__(22);
vendor: 2,473 bytes, lines 3261-3336
3261var toLength = __webpack_require__(3);
3262var toAbsoluteIndex = __webpack_require__(34);
3263
3264// `Array.prototype.{ indexOf, includes }` methods implementation
3265var createMethod = function (IS_INCLUDES) {
3266  return function ($this, el, fromIndex) {
3267    var O = toIndexedObject($this);
3268    var length = toLength(O.length);
3269    var index = toAbsoluteIndex(fromIndex, length);
3270    var value;
3271    // Array#includes uses SameValueZero equality algorithm
3272    // eslint-disable-next-line no-self-compare
3273    if (IS_INCLUDES && el != el) while (length > index) {
3274      value = O[index++];
3275      // eslint-disable-next-line no-self-compare
3276      if (value != value) return true;
3277    // Array#indexOf ignores holes, Array#includes - not
3278    } else for (;length > index; index++) {
3279      if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
3280    } return !IS_INCLUDES && -1;
3281  };
3282};
3283
3284module.exports = {
3285  // `Array.prototype.includes` method
3286  // https://tc39.github.io/ecma262/#sec-array.prototype.includes
3287  includes: createMethod(true),
3288  // `Array.prototype.indexOf` method
3289  // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
3290  indexOf: createMethod(false)
3291};
3292
3293
3294/***/ }),
3295/* 83 */
3296/***/ (function(module, exports) {
3297
3298// IE8- don't enum bug keys
3299module.exports = [
3300  'constructor',
3301  'hasOwnProperty',
3302  'isPrototypeOf',
3303  'propertyIsEnumerable',
3304  'toLocaleString',
3305  'toString',
3306  'valueOf'
3307];
3308
3309
3310/***/ }),
3311/* 84 */
3312/***/ (function(module, __webpack_exports__, __webpack_require__) {
3313
3314"use strict";
3315__webpack_require__.r(__webpack_exports__);
3316/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ActionTypes", function() { return ActionTypes; });
3317/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return createStore; });
3318/* harmony import */ var lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(129);
3319/* harmony import */ var symbol_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(301);
3320
3321
3322
3323/**
3324 * These are private action types reserved by Redux.
3325 * For any unknown actions, you must return the current state.
3326 * If the current state is undefined, you must return the initial state.
3327 * Do not reference these action types directly in your code.
3328 */
3329var ActionTypes = {
3330  INIT: '@@redux/INIT'
3331};
3332
3333/**
3334 * Creates a Redux store that holds the state tree.
3335 * The only way to change the data in the store is to call `dispatch()` on it.
3336 *
3337 * There should only be a single store in your app. To specify how different
3338 * parts of the state tree respond to actions, you may combine several reducers
3339 * into a single reducer function by using `combineReducers`.
3340 *
3341 * @param {Function} reducer A function that returns the next state tree, given
3342 * the current state tree and the action to handle.
3343 *
3344 * @param {any} [preloadedState] The initial state. You may optionally specify it
3345 * to hydrate the state from the server in universal apps, or to restore a
3346 * previously serialized user session.
3347 * If you use `combineReducers` to produce the root reducer function, this must be
3348 * an object with the same shape as `combineReducers` keys.
3349 *
3350 * @param {Function} enhancer The store enhancer. You may optionally specify it
3351 * to enhance the store with third-party capabilities such as middleware,
3352 * time travel, persistence, etc. The only store enhancer that ships with Redux
3353 * is `applyMiddleware()`.
3354 *
3355 * @returns {Store} A Redux store that lets you read the state, dispatch actions
3356 * and subscribe to changes.
3357 */
3358function createStore(reducer, preloadedState, enhancer) {
3359  var _ref2;
3360
3361  if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
3362    enhancer = preloadedState;
3363    preloadedState = undefined;
3364  }
3365
3366  if (typeof enhancer !== 'undefined') {
3367    if (typeof enhancer !== 'function') {
3368      throw new Error('Expected the enhancer to be a function.');
3369    }
3370
3371    return enhancer(createStore)(reducer, preloadedState);
3372  }
3373
3374  if (typeof reducer !== 'function') {
3375    throw new Error('Expected the reducer to be a function.');
3376  }
3377
3378  var currentReducer = reducer;
3379  var currentState = preloadedState;
3380  var currentListeners = [];
3381  var nextListeners = currentListeners;
3382  var isDispatching = false;
3383
3384  function ensureCanMutateNextListeners() {
3385    if (nextListeners === currentListeners) {
3386      nextListeners = currentListeners.slice();
3387    }
3388  }
3389
3390  /**
3391   * Reads the state tree managed by the store.
3392   *
3393   * @returns {any} The current state tree of your application.
3394   */
3395  function getState() {
3396    return currentState;
3397  }
3398
3399  /**
3400   * Adds a change listener. It will be called any time an action is dispatched,
3401   * and some part of the state tree may potentially have changed. You may then
3402   * call `getState()` to read the current state tree inside the callback.
3403   *
3404   * You may call `dispatch()` from a change listener, with the following
3405   * caveats:
3406   *
3407   * 1. The subscriptions are snapshotted just before every `dispatch()` call.
3408   * If you subscribe or unsubscribe while the listeners are being invoked, this
3409   * will not have any effect on the `dispatch()` that is currently in progress.
3410   * However, the next `dispatch()` call, whether nested or not, will use a more
3411   * recent snapshot of the subscription list.
3412   *
3413   * 2. The listener should not expect to see all state changes, as the state
3414   * might have been updated multiple times during a nested `dispatch()` before
3415   * the listener is called. It is, however, guaranteed that all subscribers
3416   * registered before the `dispatch()` started will be called with the latest
3417   * state by the time it exits.
3418   *
3419   * @param {Function} listener A callback to be invoked on every dispatch.
3420   * @returns {Function} A function to remove this change listener.
3421   */
3422  function subscribe(listener) {
3423    if (typeof listener !== 'function') {
3424      throw new Error('Expected listener to be a function.');
3425    }
3426
3427    var isSubscribed = true;
3428
3429    ensureCanMutateNextListeners();
3430    nextListeners.push(listener);
3431
3432    return function unsubscribe() {
3433      if (!isSubscribed) {
3434        return;
3435      }
3436
3437      isSubscribed = false;
3438
3439      ensureCanMutateNextListeners();
3440      var index = nextListeners.indexOf(listener);
3441      nextListeners.splice(index, 1);
3442    };
3443  }
3444
3445  /**
3446   * Dispatches an action. It is the only way to trigger a state change.
3447   *
3448   * The `reducer` function, used to create the store, will be called with the
3449   * current state tree and the given `action`. Its return value will
3450   * be considered the **next** state of the tree, and the change listeners
3451   * will be notified.
3452   *
3453   * The base implementation only supports plain object actions. If you want to
3454   * dispatch a Promise, an Observable, a thunk, or something else, you need to
3455   * wrap your store creating function into the corresponding middleware. For
3456   * example, see the documentation for the `redux-thunk` package. Even the
3457   * middleware will eventually dispatch plain object actions using this method.
3458   *
3459   * @param {Object} action A plain object representing “what changed”. It is
3460   * a good idea to keep actions serializable so you can record and replay user
3461   * sessions, or use the time travelling `redux-devtools`. An action must have
3462   * a `type` property which may not be `undefined`. It is a good idea to use
3463   * string constants for action types.
3464   *
3465   * @returns {Object} For convenience, the same action object you dispatched.
3466   *
3467   * Note that, if you use a custom middleware, it may wrap `dispatch()` to
3468   * return something else (for example, a Promise you can await).
3469   */
3470  function dispatch(action) {
3471    if (!Object(lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_0__["default"])(action)) {
3472      throw new Error('Actions must be plain objects. ' + 'Use custom middleware for async actions.');
3473    }
3474
3475    if (typeof action.type === 'undefined') {
3476      throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?');
3477    }
3478
3479    if (isDispatching) {
3480      throw new Error('Reducers may not dispatch actions.');
3481    }
3482
3483    try {
3484      isDispatching = true;
3485      currentState = currentReducer(currentState, action);
3486    } finally {
3487      isDispatching = false;
3488    }
3489
3490    var listeners = currentListeners = nextListeners;
3491    for (var i = 0; i < listeners.length; i++) {
3492      listeners[i]();
3493    }
3494
3495    return action;
3496  }
3497
3498  /**
3499   * Replaces the reducer currently used by the store to calculate the state.
3500   *
3501   * You might need this if your app implements code splitting and you want to
3502   * load some of the reducers dynamically. You might also need this if you
3503   * implement a hot reloading mechanism for Redux.
3504   *
3505   * @param {Function} nextReducer The reducer for the store to use instead.
3506   * @returns {void}
3507   */
3508  function replaceReducer(nextReducer) {
3509    if (typeof nextReducer !== 'function') {
3510      throw new Error('Expected the nextReducer to be a function.');
3511    }
3512
3513    currentReducer = nextReducer;
3514    dispatch({ type: ActionTypes.INIT });
3515  }
3516
3517  /**
3518   * Interoperability point for observable/reactive libraries.
3519   * @returns {observable} A minimal observable of state changes.
3520   * For more information, see the observable proposal:
3521   * https://github.com/zenparsing/es-observable
3522   */
3523  function observable() {
3524    var _ref;
3525
3526    var outerSubscribe = subscribe;
3527    return _ref = {
3528      /**
3529       * The minimal observable subscription method.
3530       * @param {Object} observer Any object that can be used as an observer.
3531       * The observer object should have a `next` method.
3532       * @returns {subscription} An object with an `unsubscribe` method that can
3533       * be used to unsubscribe the observable from the store, and prevent further
3534       * emission of values from the observable.
3535       */
3536      subscribe: function subscribe(observer) {
3537        if (typeof observer !== 'object') {
3538          throw new TypeError('Expected the observer to be an object.');
3539        }
3540
3541        function observeState() {
3542          if (observer.next) {
3543            observer.next(getState());
3544          }
3545        }
3546
3547        observeState();
3548        var unsubscribe = outerSubscribe(observeState);
3549        return { unsubscribe: unsubscribe };
3550      }
3551    }, _ref[symbol_observable__WEBPACK_IMPORTED_MODULE_1__["default"]] = function () {
3552      return this;
3553    }, _ref;
3554  }
3555
3556  // When a store is created, an "INIT" action is dispatched so that every
3557  // reducer returns their initial state. This effectively populates
3558  // the initial state tree.
3559  dispatch({ type: ActionTypes.INIT });
3560
3561  return _ref2 = {
3562    dispatch: dispatch,
3563    subscribe: subscribe,
3564    getState: getState,
3565    replaceReducer: replaceReducer
3566  }, _ref2[symbol_observable__WEBPACK_IMPORTED_MODULE_1__["default"]] = observable, _ref2;
3567}
3568
3569/***/ }),
3570/* 85 */
3571/***/ (function(module, __webpack_exports__, __webpack_require__) {
3572
3573"use strict";
3574__webpack_require__.r(__webpack_exports__);
3575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return compose; });
3576/**
3577 * Composes single-argument functions from right to left. The rightmost
3578 * function can take multiple arguments as it provides the signature for
3579 * the resulting composite function.
3580 *
3581 * @param {...Function} funcs The functions to compose.
3582 * @returns {Function} A function obtained by composing the argument functions
3583 * from right to left. For example, compose(f, g, h) is identical to doing
3584 * (...args) => f(g(h(...args))).
3585 */
3586
3587function compose() {
3588  for (var _len = arguments.length, funcs = Array(_len), _key = 0; _key < _len; _key++) {
3589    funcs[_key] = arguments[_key];
3590  }
3591
3592  if (funcs.length === 0) {
3593    return function (arg) {
3594      return arg;
3595    };
3596  }
3597
3598  if (funcs.length === 1) {
3599    return funcs[0];
3600  }
3601
3602  var last = funcs[funcs.length - 1];
3603  var rest = funcs.slice(0, -1);
3604  return function () {
3605    return rest.reduceRight(function (composed, f) {
3606      return f(composed);
3607    }, last.apply(undefined, arguments));
3608  };
3609}
3610
3611/***/ }),
3612/* 86 */
3613/***/ (function(module, exports, __webpack_require__) {
3614
3615"use strict";
3616
3617
3618var _interopRequireDefault = __webpack_require__(1);
3619
3620Object.defineProperty(exports, "__esModule", {
3621  value: true
3622});
3623exports.TRANSFORM_STYLE_PREFIXED = exports.TRANSFORM_PREFIXED = exports.FLEX_PREFIXED = exports.ELEMENT_MATCHES = exports.withBrowser = exports.IS_BROW
3623SER_ENV = void 0;
3624
3625var _find = _interopRequireDefault(__webpack_require__(135));
3626/* eslint-env browser */
3627
3628
3629var IS_BROWSER_ENV = typeof window !== 'undefined'; // $FlowFixMe
3630
3631exports.IS_BROWSER_ENV = IS_BROWSER_ENV;
3632
3633var withBrowser = function withBrowser(fn, fallback) {
3634  if (IS_BROWSER_ENV) {
3635    return fn();
3636  }
3637
3638  return fallback;
3639};
3640
3641exports.withBrowser = withBrowser;
3642var ELEMENT_MATCHES = withBrowser(function () {
3643  return (0, _find["default"])(['matches', 'matchesSelector', 'mozMatchesSelector', 'msMatchesSelector', 'oMatchesSelector', 'webkitMatchesSelector'], function (key) {
3644    return key in Element.prototype;
3645  });
3646});
3647exports.ELEMENT_MATCHES = ELEMENT_MATCHES;
3648var FLEX_PREFIXED = withBrowser(function () {
3649  var el = document.createElement('i');
3650  var values = ['flex', '-webkit-flex', '-ms-flexbox', '-moz-box', '-webkit-box'];
3651  var none = '';
3652
3653  try {
3654    var length = values.length;
3655
3656    for (var i = 0; i < length; i++) {
3657      var value = values[i];
3658      el.style.display = value;
3659
3660      if (el.style.display === value) {
3661        return value;
3662      }
3663    }
3664
3665    return none;
3666  } catch (err) {
3667    return none;
3668  }
3669}, 'flex');
3670exports.FLEX_PREFIXED = FLEX_PREFIXED;
3671var TRANSFORM_PREFIXED = withBrowser(function () {
3672  var el = document.createElement('i');
3673
3674  if (el.style.transform == null) {
3675    var prefixes = ['Webkit', 'Moz', 'ms'];
3676    var suffix = 'Transform';
3677    var length = prefixes.length;
3678
3679    for (var i = 0; i < length; i++) {
3680      var prop = prefixes[i] + suffix; // $FlowFixMe
3681
3682      if (el.style[prop] !== undefined) {
3683        return prop;
3684      }
3685    }
3686  }
3687
3688  return 'transform';
3689}, 'transform'); // $FlowFixMe
3690
3691exports.TRANSFORM_PREFIXED = TRANSFORM_PREFIXED;
3692var TRANSFORM_PREFIX = TRANSFORM_PREFIXED.split('transform')[0];
3693var TRANSFORM_STYLE_PREFIXED = TRANSFORM_PREFIX ? TRANSFORM_PREFIX + 'TransformStyle' : 'transformStyle';
3694exports.TRANSFORM_STYLE_PREFIXED = TRANSFORM_STYLE_PREFIXED;
3695
3696/***/ }),
3697/* 87 */
3698/***/ (function(module, exports, __webpack_require__) {
3699
3700"use strict";
3701
3702
3703var _interopRequireDefault = __webpack_require__(1);
3704
3705Object.defineProperty(exports, "__esModule", {
3706  value: true
3707});
3708exports.mediaQueriesDefined = exports.viewportWidthChanged = exports.actionListPlaybackChanged = exports.elementStateChanged = exports.instanceRemoved = exports.instanceStarted = exports.instanceAdded = exports.parameterChanged = exports.animationFrameChanged = exports.eventStateChanged = exports.testFrameRendered = exports.eventListenerAdded = exports.clearRequested = exports.stopRequested = exports.playbackRequested = exports.previewRequested = exports.sessionStopped = exports.sessionStarted = exports.sessionInitialized = exports.rawDataImported = void 0;
3709
3710var _extends2 = _interopRequireDefault(__webpack_require__(30));
3711
3712var _constants = __webpack_require__(6);
3713
3714var _shared = __webpack_require__(29);
3715
3716var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
3717    IX2_RAW_DATA_IMPORTED = _constants$IX2EngineA.IX2_RAW_DATA_IMPORTED,
3718    IX2_SESSION_INITIALIZED = _constants$IX2EngineA.IX2_SESSION_INITIALIZED,
3719    IX2_SESSION_STARTED = _constants$IX2EngineA.IX2_SESSION_STARTED,
3720    IX2_SESSION_STOPPED = _constants$IX2EngineA.IX2_SESSION_STOPPED,
3721    IX2_PREVIEW_REQUESTED = _constants$IX2EngineA.IX2_PREVIEW_REQUESTED,
3722    IX2_PLAYBACK_REQUESTED = _constants$IX2EngineA.IX2_PLAYBACK_REQUESTED,
3723    IX2_STOP_REQUESTED = _constants$IX2EngineA.IX2_STOP_REQUESTED,
3724    IX2_CLEAR_REQUESTED = _constants$IX2EngineA.IX2_CLEAR_REQUESTED,
3725    IX2_EVENT_LISTENER_ADDED = _constants$IX2EngineA.IX2_EVENT_LISTENER_ADDED,
3726    IX2_TEST_FRAME_RENDERED = _constants$IX2EngineA.IX2_TEST_FRAME_RENDERED,
3727    IX2_EVENT_STATE_CHANGED = _constants$IX2EngineA.IX2_EVENT_STATE_CHANGED,
3728    IX2_ANIMATION_FRAME_CHANGED = _constants$IX2EngineA.IX2_ANIMATION_FRAME_CHANGED,
3729    IX2_PARAMETER_CHANGED = _constants$IX2EngineA.IX2_PARAMETER_CHANGED,
3730    IX2_INSTANCE_ADDED = _constants$IX2EngineA.IX2_INSTANCE_ADDED,
3731    IX2_INSTANCE_STARTED = _constants$IX2EngineA.IX2_INSTANCE_STARTED,
3732    IX2_INSTANCE_REMOVED = _constants$IX2EngineA.IX2_INSTANCE_REMOVED,
3733    IX2_ELEMENT_STATE_CHANGED = _constants$IX2EngineA.IX2_ELEMENT_STATE_CHANGED,
3734    IX2_ACTION_LIST_PLAYBACK_CHANGED = _constants$IX2EngineA.IX2_ACTION_LIST_PLAYBACK_CHANGED,
3735    IX2_VIEWPORT_WIDTH_CHANGED = _constants$IX2EngineA.IX2_VIEWPORT_WIDTH_CHANGED,
3736    IX2_MEDIA_QUERIES_DEFINED = _constants$IX2EngineA.IX2_MEDIA_QUERIES_DEFINED;
3737var reifyState = _shared.IX2VanillaUtils.reifyState; // TODO: Figure out what this is and elevate it
3738
3739var rawDataImported = function rawDataImported(rawData) {
3740  return {
3741    type: IX2_RAW_DATA_IMPORTED,
3742    payload: (0, _extends2["default"])({}, reifyState(rawData))
3743  };
3744};
3745
3746exports.rawDataImported = rawDataImported;
3747
3748var sessionInitialized = function sessionInitialized(_ref) {
3749  var hasBoundaryNodes = _ref.hasBoundaryNodes;
3750  return {
3751    type: IX2_SESSION_INITIALIZED,
3752    payload: {
3753      hasBoundaryNodes: hasBoundaryNodes
3754    }
3755  };
3756};
3757
3758exports.sessionInitialized = sessionInitialized;
3759
3760var sessionStarted = function sessionStarted() {
3761  return {
3762    type: IX2_SESSION_STARTED
3763  };
3764};
3765
3766exports.sessionStarted = sessionStarted;
3767
3768var sessionStopped = function sessionStopped() {
3769  return {
3770    type: IX2_SESSION_STOPPED
3771  };
3772};
3773
3774exports.sessionStopped = sessionStopped;
3775
3776var previewRequested = function previewRequested(_ref2) {
3777  var rawData = _ref2.rawData,
3778      defer = _ref2.defer;
3779  return {
3780    type: IX2_PREVIEW_REQUESTED,
3781    payload: {
3782      defer: defer,
3783      rawData: rawData
3784    }
3785  };
3786};
3787
3788exports.previewRequested = previewRequested;
3789
3790var playbackRequested = function playbackRequested(_ref3) {
3791  var _ref3$actionTypeId = _ref3.actionTypeId,
3792      actionTypeId = _ref3$actionTypeId === void 0 ? _constants.ActionTypeConsts.GENERAL_START_ACTION : _ref3$actionTypeId,
3793      actionListId = _ref3.actionListId,
3794      actionItemId = _ref3.actionItemId,
3795      eventId = _ref3.eventId,
3796      allowEvents = _ref3.allowEvents,
3797      immediate = _ref3.immediate,
3798      testManual = _ref3.testManual,
3799      verbose = _ref3.verbose,
3800      rawData = _ref3.rawData;
3801  return {
3802    type: IX2_PLAYBACK_REQUESTED,
3803    payload: {
3804      actionTypeId: actionTypeId,
3805      actionListId: actionListId,
3806      actionItemId: actionItemId,
3807      testManual: testManual,
3808      eventId: eventId,
3809      allowEvents: allowEvents,
3810      immediate: immediate,
3811      verbose: verbose,
3812      rawData: rawData
3813    }
3814  };
3815};
3816
3817exports.playbackRequested = playbackRequested;
3818
3819var stopRequested = function stopRequested(actionListId) {
3820  return {
3821    type: IX2_STOP_REQUESTED,
3822    payload: {
3823      actionListId: actionListId
3824    }
3825  };
3826};
3827
3828exports.stopRequested = stopRequested;
3829
3830var clearRequested = function clearRequested() {
3831  return {
3832    type: IX2_CLEAR_REQUESTED
3833  };
3834};
3835
3836exports.clearRequested = clearRequested;
3837
3838var eventListenerAdded = function eventListenerAdded(target, listenerParams) {
3839  return {
3840    type: IX2_EVENT_LISTENER_ADDED,
3841    payload: {
3842      target: target,
3843      listenerParams: listenerParams
3844    }
3845  };
3846};
3847
3848exports.eventListenerAdded = eventListenerAdded;
3849
3850var testFrameRendered = function testFrameRendered() {
3851  var step = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
3852  return {
3853    type: IX2_TEST_FRAME_RENDERED,
3854    payload: {
3855      step: step
3856    }
3857  };
3858};
3859
3860exports.testFrameRendered = testFrameRendered;
3861
3862var eventStateChanged = function eventStateChanged(stateKey, newState) {
3863  return {
3864    type: IX2_EVENT_STATE_CHANGED,
3865    payload: {
3866      stateKey: stateKey,
3867      newState: newState
3868    }
3869  };
3870};
3871
3872exports.eventStateChanged = eventStateChanged;
3873
3874var animationFrameChanged = function animationFrameChanged(now, parameters) {
3875  return {
3876    type: IX2_ANIMATION_FRAME_CHANGED,
3877    payload: {
3878      now: now,
3879      parameters: parameters
3880    }
3881  };
3882};
3883
3884exports.animationFrameChanged = animationFrameChanged;
3885
3886var parameterChanged = function parameterChanged(key, value) {
3887  return {
3888    type: IX2_PARAMETER_CHANGED,
3889    payload: {
3890      key: key,
3891      value: value
3892    }
3893  };
3894};
3895
3896exports.parameterChanged = parameterChanged;
3897
3898var instanceAdded = function instanceAdded(options) {
3899  return {
3900    type: IX2_INSTANCE_ADDED,
3901    payload: (0, _extends2["default"])({}, options)
3902  };
3903};
3904
3905exports.instanceAdded = instanceAdded;
3906
3907var instanceStarted = function instanceStarted(instanceId, time) {
3908  return {
3909    type: IX2_INSTANCE_STARTED,
3910    payload: {
3911      instanceId: instanceId,
3912      time: time
3913    }
3914  };
3915};
3916
3917exports.instanceStarted = instanceStarted;
3918
3919var instanceRemoved = function instanceRemoved(instanceId) {
3920  return {
3921    type: IX2_INSTANCE_REMOVED,
3922    payload: {
3923      instanceId: instanceId
3924    }
3925  };
3926};
3927
3928exports.instanceRemoved = instanceRemoved;
3929
3930var elementStateChanged = function elementStateChanged(elementId, actionTypeId, current, actionItem) {
3931  return {
3932    type: IX2_ELEMENT_STATE_CHANGED,
3933    payload: {
3934      elementId: elementId,
3935      actionTypeId: actionTypeId,
3936      current: current,
3937      actionItem: actionItem
3938    }
3939  };
3940};
3941
3942exports.elementStateChanged = elementStateChanged;
3943
3944var actionListPlaybackChanged = function actionListPlaybackChanged(_ref4) {
3945  var actionListId = _ref4.actionListId,
3946      isPlaying = _ref4.isPlaying;
3947  return {
3948    type: IX2_ACTION_LIST_PLAYBACK_CHANGED,
3949    payload: {
3950      actionListId: actionListId,
3951      isPlaying: isPlaying
3952    }
3953  };
3954};
3955
3956exports.actionListPlaybackChanged = actionListPlaybackChanged;
3957
3958var viewportWidthChanged = function viewportWidthChanged(_ref5) {
3959  var width = _ref5.width,
3960      mediaQueries = _ref5.mediaQueries;
3961  return {
3962    type: IX2_VIEWPORT_WIDTH_CHANGED,
3963    payload: {
3964      width: width,
3965      mediaQueries: mediaQueries
3966    }
3967  };
3968};
3969
3970exports.viewportWidthChanged = viewportWidthChanged;
3971
3972var mediaQueriesDefined = function mediaQueriesDefined() {
3973  return {
3974    type: IX2_MEDIA_QUERIES_DEFINED
3975  };
3976};
3977
3978exports.mediaQueriesDefined = mediaQueriesDefined;
3979
3980/***/ }),
3981/* 88 */
3982/***/ (function(module, exports, __webpack_require__) {
3983
3984var baseCreate = __webpack_require__(148),
3985    baseLodash = __webpack_require__(89);
3986
3987/**
3988 * The base constructor for creating `lodash` wrapper objects.
3989 *
3990 * @private
3991 * @param {*} value The value to wrap.
3992 * @param {boolean} [chainAll] Enable explicit method chain sequences.
3993 */
3994function LodashWrapper(value, chainAll) {
3995  this.__wrapped__ = value;
3996  this.__actions__ = [];
3997  this.__chain__ = !!chainAll;
3998  this.__index__ = 0;
3999  this.__values__ = undefined;
4000}
4001
4002LodashWrapper.prototype = baseCreate(baseLodash.prototype);
4003LodashWrapper.prototype.constructor = LodashWrapper;
4004
4005module.exports = LodashWrapper;
4006
4007
4008/***/ }),
4009/* 89 */
4010/***/ (function(module, exports) {
4011
4012/**
4013 * The function whose prototype chain sequence wrappers inherit from.
4014 *
4015 * @private
4016 */
4017function baseLodash() {
4018  // No operation performed.
4019}
4020
4021module.exports = baseLodash;
4022
4023
4024/***/ }),
4025/* 90 */
4026/***/ (function(module, exports, __webpack_require__) {
4027
4028var baseCreate = __webpack_require__(148),
4029    baseLodash = __webpack_require__(89);
4030
4031/** Used as references for the maximum length and index of an array. */
4032var MAX_ARRAY_LENGTH = 4294967295;
4033
4034/**
4035 * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
4036 *
4037 * @private
4038 * @constructor
4039 * @param {*} value The value to wrap.
4040 */
4041function LazyWrapper(value) {
4042  this.__wrapped__ = value;
4043  this.__actions__ = [];
4044  this.__dir__ = 1;
4045  this.__filtered__ = false;
4046  this.__iteratees__ = [];
4047  this.__takeCount__ = MAX_ARRAY_LENGTH;
4048  this.__views__ = [];
4049}
4050
4051// Ensure `LazyWrapper` is an instance of `baseLodash`.
4052LazyWrapper.prototype = baseCreate(baseLodash.prototype);
4053LazyWrapper.prototype.constructor = LazyWrapper;
4054
4055module.exports = LazyWrapper;
4056
4057
4058/***/ }),
4059/* 91 */
4060/***/ (function(module, exports, __webpack_require__) {
4061
4062"use strict";
4063 // @wf-will-never-add-flow-to-this-file
4064
4065/* eslint-disable eslint-comments/no-unlimited-disable */
4066
4067/* eslint-disable */
4068
4069/*!
4070 * tram.js v0.8.2-global
4071 * Cross-browser CSS3 transitions in JavaScript
4072 * https://github.com/bkwld/tram
4073 * MIT License
4074 */
4075
4076/* prettier-ignore */
4077
4078var _interopRequireDefault = __webpack_require__(1);
4079
4080var _typeof2 = _interopRequireDefault(__webpack_require__(41));
4081
4082window.tram = function (a) {
4083  function b(a, b) {
4084    var c = new M.Bare();
4085    return c.init(a, b);
4086  }
4087
4088  function c(a) {
4089    return a.replace(/[A-Z]/g, function (a) {
4090      return "-" + a.toLowerCase();
4091    });
4092  }
4093
4094  function d(a) {
4095    var b = parseInt(a.slice(1), 16),
4096        c = b >> 16 & 255,
4097        d = b >> 8 & 255,
4098        e = 255 & b;
4099    return [c, d, e];
4100  }
4101
4102  function e(a, b, c) {
4103    return "#" + (1 << 24 | a << 16 | b << 8 | c).toString(16).slice(1);
4104  }
4105
4106  function f() {}
4107
4108  function g(a, b) {
4109    j("Type warning: Expected: [" + a + "] Got: [" + (0, _typeof2["default"])(b) + "] " + b);
4110  }
4111
4112  function h(a, b, c) {
4113    j("Units do not match [" + a + "]: " + b + ", " + c);
4114  }
4115
4116  function i(a, b, c) {
4117    if (void 0 !== b && (c = b), void 0 === a) return c;
4118    var d = c;
4119    return $.test(a) || !_.test(a) ? d = parseInt(a, 10) : _.test(a) && (d = 1e3 * parseFloat(a)), 0 > d && (d = 0), d === d ? d : c;
4120  }
4121
4122  function j(a) {
4123    U.debug && window && window.console.warn(a);
4124  }
4125
4126  function k(a) {
4127    for (var b = -1, c = a ? a.length : 0, d = []; ++b < c;) {
4128      var e = a[b];
4129      e && d.push(e);
4130    }
4131
4132    return d;
4133  }
4134
4135  var l = function (a, b, c) {
4136    function d(a) {
4137      return "object" == (0, _typeof2["default"])(a);
4138    }
4139
4140    function e(a) {
4141      return "function" == typeof a;
4142    }
4143
4144    function f() {}
4145
4146    function g(h, i) {
4147      function j() {
4148        var a = new k();
4149        return e(a.init) && a.init.apply(a, arguments), a;
4150      }
4151
4152      function k() {}
4153
4154      i === c && (i = h, h = Object), j.Bare = k;
4155      var l,
4156          m = f[a] = h[a],
4157          n = k[a] = j[a] = new f();
4158      return n.constructor = j, j.mixin = function (b) {
4159        return k[a] = j[a] = g(j, b)[a], j;
4160      }, j.open = function (a) {
4161        if (l = {}, e(a) ? l = a.call(j, n, m, j, h) : d(a) && (l = a), d(l)) for (var c in l) {
4162          b.call(l, c) && (n[c] = l[c]);
4163        }
4164        return e(n.init) || (n.init = h), j;
4165      }, j.open(i);
4166    }
4167
4168    return g;
4169  }("prototype", {}.hasOwnProperty),
4170      m = {
4171    ease: ["ease", function (a, b, c, d) {
4172      var e = (a /= d) * a,
4173          f = e * a;
4174      return b + c * (-2.75 * f * e + 11 * e * e + -15.5 * f + 8 * e + .25 * a);
4175    }],
4176    "ease-in": ["ease-in", function (a, b, c, d) {
4177      var e = (a /= d) * a,
4178          f = e * a;
4179      return b + c * (-1 * f * e + 3 * e * e + -3 * f + 2 * e);
4180    }],
4181    "ease-out": ["ease-out", function (a, b, c, d) {
4182      var e = (a /= d) * a,
4183          f = e * a;
4184      return b + c * (.3 * f * e + -1.6 * e * e + 2.2 * f + -1.8 * e + 1.9 * a);
4185    }],
4186    "ease-in-out": ["ease-in-out", function (a, b, c, d) {
4187      var e = (a /= d) * a,
4188          f = e * a;
4189      return b + c * (2 * f * e + -5 * e * e + 2 * f + 2 * e);
4190    }],
4191    linear: ["linear", function (a, b, c, d) {
4192      return c * a / d + b;
4193    }],
4194    "ease-in-quad": ["cubic-bezier(0.550, 0.085, 0.680, 0.530)", function (a, b, c, d) {
4195      return c * (a /= d) * a + b;
4196    }],
4197    "ease-out-quad": ["cubic-bezier(0.250, 0.460, 0.450, 0.940)", function (a, b, c, d) {
4198      return -c * (a /= d) * (a - 2) + b;
4199    }],
4200    "ease-in-out-quad": ["cubic-bezier(0.455, 0.030, 0.515, 0.955)", function (a, b, c, d) {
4201      return (a /= d / 2) < 1 ? c / 2 * a * a + b : -c / 2 * (--a * (a - 2) - 1) + b;
4202    }],
4203    "ease-in-cubic": ["cubic-bezier(0.550, 0.055, 0.675, 0.190)", function (a, b, c, d) {
4204      return c * (a /= d) * a * a + b;
4205    }],
4206    "ease-out-cubic": ["cubic-bezier(0.215, 0.610, 0.355, 1)", function (a, b, c, d) {
4207      return c * ((a = a / d - 1) * a * a + 1) + b;
4208    }],
4209    "ease-in-out-cubic": ["cubic-bezier(0.645, 0.045, 0.355, 1)", function (a, b, c, d) {
4210      return (a /= d / 2) < 1 ? c / 2 * a * a * a + b : c / 2 * ((a -= 2) * a * a + 2) + b;
4211    }],
4212    "ease-in-quart": ["cubic-bezier(0.895, 0.030, 0.685, 0.220)", function (a, b, c, d) {
4213      return c * (a /= d) * a * a * a + b;
4214    }],
4215    "ease-out-quart": ["cubic-bezier(0.165, 0.840, 0.440, 1)", function (a, b, c, d) {
4216      return -c * ((a = a / d - 1) * a * a * a - 1) + b;
4217    }],
4218    "ease-in-out-quart": ["cubic-bezier(0.770, 0, 0.175, 1)", function (a, b, c, d) {
4219      return (a /= d / 2) < 1 ? c / 2 * a * a * a * a + b : -c / 2 * ((a -= 2) * a * a * a - 2) + b;
4220    }],
4221    "ease-in-quint": ["cubic-bezier(0.755, 0.050, 0.855, 0.060)", function (a, b, c, d) {
4222      return c * (a /= d) * a * a * a * a + b;
4223    }],
4224    "ease-out-quint": ["cubic-bezier(0.230, 1, 0.320, 1)", function (a, b, c, d) {
4225      return c * ((a = a / d - 1) * a * a * a * a + 1) + b;
4226    }],
4227    "ease-in-out-quint": ["cubic-bezier(0.860, 0, 0.070, 1)", function (a, b, c, d) {
4228      return (a /= d / 2) < 1 ? c / 2 * a * a * a * a * a + b : c / 2 * ((a -= 2) * a * a * a * a + 2) + b;
4229    }],
4230    "ease-in-sine": ["cubic-bezier(0.470, 0, 0.745, 0.715)", function (a, b, c, d) {
4231      return -c * Math.cos(a / d * (Math.PI / 2)) + c + b;
4232    }],
4233    "ease-out-sine": ["cubic-bezier(0.390, 0.575, 0.565, 1)", function (a, b, c, d) {
4234      return c * Math.sin(a / d * (Math.PI / 2)) + b;
4235    }],
4236    "ease-in-out-sine": ["cubic-bezier(0.445, 0.050, 0.550, 0.950)", function (a, b, c, d) {
4237      return -c / 2 * (Math.cos(Math.PI * a / d) - 1) + b;
4238    }],
4239    "ease-in-expo": ["cubic-bezier(0.950, 0.050, 0.795, 0.035)", function (a, b, c, d) {
4240      return 0 === a ? b : c * Math.pow(2, 10 * (a / d - 1)) + b;
4241    }],
4242    "ease-out-expo": ["cubic-bezier(0.190, 1, 0.220, 1)", function (a, b, c, d) {
4243      return a === d ? b + c : c * (-Math.pow(2, -10 * a / d) + 1) + b;
4244    }],
4245    "ease-in-out-expo": ["cubic-bezier(1, 0, 0, 1)", function (a, b, c, d) {
4246      return 0 === a ? b : a === d ? b + c : (a /= d / 2) < 1 ? c / 2 * Math.pow(2, 10 * (a - 1)) + b : c / 2 * (-Math.pow(2, -10 * --a) + 2) + b;
4247    }],
4248    "ease-in-circ": ["cubic-bezier(0.600, 0.040, 0.980, 0.335)", function (a, b, c, d) {
4249      return -c * (Math.sqrt(1 - (a /= d) * a) - 1) + b;
4250    }],
4251    "ease-out-circ": ["cubic-bezier(0.075, 0.820, 0.165, 1)", function (a, b, c, d) {
4252      return c * Math.sqrt(1 - (a = a / d - 1) * a) + b;
4253    }],
4254    "ease-in-out-circ": ["cubic-bezier(0.785, 0.135, 0.150, 0.860)", function (a, b, c, d) {
4255      return (a /= d / 2) < 1 ? -c / 2 * (Math.sqrt(1 - a * a) - 1) + b : c / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + b;
4256    }],
4257    "ease-in-back": ["cubic-bezier(0.600, -0.280, 0.735, 0.045)", function (a, b, c, d, e) {
4258      return void 0 === e && (e = 1.70158), c * (a /= d) * a * ((e + 1) * a - e) + b;
4259    }],
4260    "ease-out-back": ["cubic-bezier(0.175, 0.885, 0.320, 1.275)", function (a, b, c, d, e) {
4261      return void 0 === e && (e = 1.70158), c * ((a = a / d - 1) * a * ((e + 1) * a + e) + 1) + b;
4262    }],
4263    "ease-in-out-back": ["cubic-bezier(0.680, -0.550, 0.265, 1.550)", function (a, b, c, d, e) {
4264      return void 0 === e && (e = 1.70158), (a /= d / 2) < 1 ? c / 2 * a * a * (((e *= 1.525) + 1) * a - e) + b : c / 2 * ((a -= 2) * a * (((e *= 1.525) + 1) * a + e) + 2) + b;
4265    }]
4266  },
4267      n = {
4268    "ease-in-back": "cubic-bezier(0.600, 0, 0.735, 0.045)",
4269    "ease-out-back": "cubic-bezier(0.175, 0.885, 0.320, 1)",
4270    "ease-in-out-back": "cubic-bezier(0.680, 0, 0.265, 1)"
4271  },
4272      o = document,
4273      p = window,
4274      q = "bkwld-tram",
4275      r = /[\-\.0-9]/g,
4276      s = /[A-Z]/,
4277      t = "number",
4278      u = /^(rgb|#)/,
4279      v = /(em|cm|mm|in|pt|pc|px)$/,
4280      w = /(em|cm|mm|in|pt|pc|px|%)$/,
4281      x = /(deg|rad|turn)$/,
4282      y = "unitless",
4283      z = /(all|none) 0s ease 0s/,
4284      A = /^(width|height)$/,
4285      B = " ",
4286      C = o.createElement("a"),
4287      D = ["Webkit", "Moz", "O", "ms"],
4288      E = ["-webkit-", "-moz-", "-o-", "-ms-"],
4289      F = function F(a) {
4290    if (a in C.style) return {
4291      dom: a,
4292      css: a
4293    };
4294    var b,
4295        c,
4296        d = "",
4297        e = a.split("-");
4298
4299    for (b = 0; b < e.length; b++) {
4300      d += e[b].charAt(0).toUpperCase() + e[b].slice(1);
4301    }
4302
4303    for (b = 0; b < D.length; b++) {
4304      if (c = D[b] + d, c in C.style) return {
4305        dom: c,
4306        css: E[b] + a
4307      };
4308    }
4309  },
4310      G = b.support = {
4311    bind: Function.prototype.bind,
4312    transform: F("transform"),
4313    transition: F("transition"),
4314    backface: F("backface-visibility"),
4315    timing: F("transition-timing-function")
4316  };
4317
4318  if (G.transition) {
4319    var H = G.timing.dom;
4320    if (C.style[H] = m["ease-in-back"][0], !C.style[H]) for (var I in n) {
4321      m[I][0] = n[I];
4322    }
4323  }
4324
4325  var J = b.frame = function () {
4326    var a = p.requestAnimationFrame || p.webkitRequestAnimationFrame || p.mozRequestAnimationFrame || p.oRequestAnimationFrame || p.msRequestAnimationFrame;
4327    return a && G.bind ? a.bind(p) : function (a) {
4328      p.setTimeout(a, 16);
4329    };
4330  }(),
4331      K = b.now = function () {
4332    var a = p.performance,
4333        b = a && (a.now || a.webkitNow || a.msNow || a.mozNow);
4334    return b && G.bind ? b.bind(a) : Date.now || function () {
4335      return +new Date();
4336    };
4337  }(),
4338      L = l(function (b) {
4339    function d(a, b) {
4340      var c = k(("" + a).split(B)),
4341          d = c[0];
4342      b = b || {};
4343      var e = Y[d];
4344      if (!e) return j("Unsupported property: " + d);
4345
4346      if (!b.weak || !this.props[d]) {
4347        var f = e[0],
4348            g = this.props[d];
4349        return g || (g = this.props[d] = new f.Bare()), g.init(this.$el, c, e, b), g;
4350      }
4351    }
4352
4353    function e(a, b, c) {
4354      if (a) {
4355        var e = (0, _typeof2["default"])(a);
4356        if (b || (this.timer && this.timer.destroy(), this.queue = [], this.active = !1), "number" == e && b) return this.timer = new S({
4357          duration: a,
4358          context: this,
4359          complete: h
4360        }), void (this.active = !0);
4361
4362        if ("string" == e && b) {
4363          switch (a) {
4364            case "hide":
4365              o.call(this);
4366              break;
4367
4368            case "stop":
4369              l.call(this);
4370              break;
4371
4372            case "redraw":
4373              p.call(this);
4374              break;
4375
4376            default:
4377              d.call(this, a, c && c[1]);
4378          }
4379
4380          return h.call(this);
4381        }
4382
4383        if ("function" == e) return void a.call(this, this);
4384
4385        if ("object" == e) {
4386          var f = 0;
4387          u.call(this, a, function (a, b) {
4388            a.span > f && (f = a.span), a.stop(), a.animate(b);
4389          }, function (a) {
4390            "wait" in a && (f = i(a.wait, 0));
4391          }), t.call(this), f > 0 && (this.timer = new S({
4392            duration: f,
4393            context: this
4394          }), this.active = !0, b && (this.timer.complete = h));
4395          var g = this,
4396              j = !1,
4397              k = {};
4398          J(function () {
4399            u.call(g, a, function (a) {
4400              a.active && (j = !0, k[a.name] = a.nextStyle);
4401            }), j && g.$el.css(k);
4402          });
4403        }
4404      }
4405    }
4406
4407    function f(a) {
4408      a = i(a, 0), this.active ? this.queue.push({
4409        options: a
4410      }) : (this.timer = new S({
4411        duration: a,
4412        context: this,
4413        complete: h
4414      }), this.active = !0);
4415    }
4416
4417    function g(a) {
4418      return this.active ? (this.queue.push({
4419        options: a,
4420        args: arguments
4421      }), void (this.timer.complete = h)) : j("No active transition timer. Use start() or wait() before then().");
4422    }
4423
4424    function h() {
4425      if (this.timer && this.timer.destroy(), this.active = !1, this.queue.length) {
4426        var a = this.queue.shift();
4427        e.call(this, a.options, !0, a.args);
4428      }
4429    }
4430
4431    function l(a) {
4432      this.timer && this.timer.destroy(), this.queue = [], this.active = !1;
4433      var b;
4434      "string" == typeof a ? (b = {}, b[a] = 1) : b = "object" == (0, _typeof2["default"])(a) && null != a ? a : this.props, u.call(this, b, v), t.call(this);
4435    }
4436
4437    function m(a) {
4438      l.call(this, a), u.call(this, a, w, x);
4439    }
4440
4441    function n(a) {
4442      "string" != typeof a && (a = "block"), this.el.style.display = a;
4443    }
4444
4445    function o() {
4446      l.call(this), this.el.style.display = "none";
4447    }
4448
4449    function p() {
4450      this.el.offsetHeight;
4451    }
4452
4453    function r() {
4454      l.call(this), a.removeData(this.el, q), this.$el = this.el = null;
4455    }
4456
4457    function t() {
4458      var a,
4459          b,
4460          c = [];
4461      this.upstream && c.push(this.upstream);
4462
4463      for (a in this.props) {
4464        b = this.props[a], b.active && c.push(b.string);
4465      }
4466
4467      c = c.join(","), this.style !== c && (this.style = c, this.el.style[G.transition.dom] = c);
4468    }
4469
4470    function u(a, b, e) {
4471      var f,
4472          g,
4473          h,
4474          i,
4475          j = b !== v,
4476          k = {};
4477
4478      for (f in a) {
4479        h = a[f], f in Z ? (k.transform || (k.transform = {}), k.transform[f] = h) : (s.test(f) && (f = c(f)), f in Y ? k[f] = h : (i || (i = {}), i[f] = h));
4480      }
4481
4482      for (f in k) {
4483        if (h = k[f], g = this.props[f], !g) {
4484          if (!j) continue;
4485          g = d.call(this, f);
4486        }
4487
4488        b.call(this, g, h);
4489      }
4490
4491      e && i && e.call(this, i);
4492    }
4493
4494    function v(a) {
4495      a.stop();
4496    }
4497
4498    function w(a, b) {
4499      a.set(b);
4500    }
4501
4502    function x(a) {
4503      this.$el.css(a);
4504    }
4505
4506    function y(a, c) {
4507      b[a] = function () {
4508        return this.children ? A.call(this, c, arguments) : (this.el && c.apply(this, arguments), this);
4509      };
4510    }
4511
4512    function A(a, b) {
4513      var c,
4514          d = this.children.length;
4515
4516      for (c = 0; d > c; c++) {
4517        a.apply(this.children[c], b);
4518      }
4519
4520      return this;
4521    }
4522
4523    b.init = function (b) {
4524      if (this.$el = a(b), this.el = this.$el[0], this.props = {}, this.queue = [], this.style = "", this.active = !1, U.keepInherited && !U.fallback) {
4525        var c = W(this.el, "transition");
4526        c && !z.test(c) && (this.upstream = c);
4527      }
4528
4529      G.backface && U.hideBackface && V(this.el, G.backface.css, "hidden");
4530    }, y("add", d), y("start", e), y("wait", f), y("then", g), y("next", h), y("stop", l), y("set", m), y("show", n), y("hide", o), y("redraw", p), y("destroy", r);
4531  }),
4532      M = l(L, function (b) {
4533    function c(b, c) {
4534      var d = a.data(b, q) || a.data(b, q, new L.Bare());
4535      return d.el || d.init(b), c ? d.start(c) : d;
4536    }
4537
4538    b.init = function (b, d) {
4539      var e = a(b);
4540      if (!e.length) return this;
4541      if (1 === e.length) return c(e[0], d);
4542      var f = [];
4543      return e.each(function (a, b) {
4544        f.push(c(b, d));
4545      }), this.children = f, this;
4546    };
4547  }),
4548      N = l(function (a) {
4549    function b() {
4550      var a = this.get();
4551      this.update("auto");
4552      var b = this.get();
4553      return this.update(a), b;
4554    }
4555
4556    function c(a, b, c) {
4557      return void 0 !== b && (c = b), a in m ? a : c;
4558    }
4559
4560    function d(a) {
4561      var b = /rgba?\((\d+),\s*(\d+),\s*(\d+)/.exec(a);
4562      return (b ? e(b[1], b[2], b[3]) : a).replace(/#(\w)(\w)(\w)$/, "#$1$1$2$2$3$3");
4563    }
4564
4565    var f = {
4566      duration: 500,
4567      ease: "ease",
4568      delay: 0
4569    };
4570    a.init = function (a, b, d, e) {
4571      this.$el = a, this.el = a[0];
4572      var g = b[0];
4573      d[2] && (g = d[2]), X[g] && (g = X[g]), this.name = g, this.type = d[1], this.duration = i(b[1], this.duration, f.duration), this.ease = c(b[2], this.ease, f.ease), this.delay = i(b[3], this.delay, f.delay), this.span = this.duration + this.delay, this.active = !1, this.nextStyle = null, this.auto = A.test(this.name), this.unit = e.unit || this.unit || U.defaultUnit, this.angle = e.angle || this.angle || U.defaultAngle, U.fallback || e.fallback ? this.animate = this.fallback : (this.animate = this.transition, this.string = this.name + B + this.duration + "ms" + ("ease" != this.ease ? B + m[this.ease][0] : "") + (this.delay ? B + this.delay + "ms" : ""));
4574    }, a.set = function (a) {
4575      a = this.convert(a, this.type), this.update(a), this.redraw();
4576    }, a.transition = function (a) {
4577      this.active = !0, a = this.convert(a, this.type), this.auto && ("auto" == this.el.style[this.name] && (this.update(this.get()), this.redraw()), "auto" == a && (a = b.call(this))), this.nextStyle = a;
4578    }, a.fallback = function (a) {
4579      var c = this.el.style[this.name] || this.convert(this.get(), this.type);
4580      a = this.convert(a, this.type), this.auto && ("auto" == c && (c = this.convert(this.get(), this.type)), "auto" == a && (a = b.call(this))), this.tween = new R({
4581        from: c,
4582        to: a,
4583        duration: this.duration,
4584        delay: this.delay,
4585        ease: this.ease,
4586        update: this.update,
4587        context: this
4588      });
4589    }, a.get = function () {
4590      return W(this.el, this.name);
4591    }, a.update = function (a) {
4592      V(this.el, this.name, a);
4593    }, a.stop = function () {
4594      (this.active || this.nextStyle) && (this.active = !1, this.nextStyle = null, V(this.el, this.name, this.get()));
4595      var a = this.tween;
4596      a && a.context && a.destroy();
4597    }, a.convert = function (a, b) {
4598      if ("auto" == a && this.auto) return a;
4599      var c,
4600          e = "number" == typeof a,
4601          f = "string" == typeof a;
4602
4603      switch (b) {
4604        case t:
4605          if (e) return a;
4606          if (f && "" === a.replace(r, "")) return +a;
4607          c = "number(unitless)";
4608          break;
4609
4610        case u:
4611          if (f) {
4612            if ("" === a && this.original) return this.original;
4613            if (b.test(a)) return "#" == a.charAt(0) && 7 == a.length ? a : d(a);
4614          }
4615
4616          c = "hex or rgb string";
4617          break;
4618
4619        case v:
4620          if (e) return a + this.unit;
4621          if (f && b.test(a)) return a;
4622          c = "number(px) or string(unit)";
4623          break;
4624
4625        case w:
4626          if (e) return a + this.unit;
4627          if (f && b.test(a)) return a;
4628          c = "number(px) or string(unit or %)";
4629          break;
4630
4631        case x:
4632          if (e) return a + this.angle;
4633          if (f && b.test(a)) return a;
4634          c = "number(deg) or string(angle)";
4635          break;
4636
4637        case y:
4638          if (e) return a;
4639          if (f && w.test(a)) return a;
4640          c = "number(unitless) or string(unit or %)";
4641      }
4642
4643      return g(c, a), a;
4644    }, a.redraw = function () {
4645      this.el.offsetHeight;
4646    };
4647  }),
4648      O = l(N, function (a, b) {
4649    a.init = function () {
4650      b.init.apply(this, arguments), this.original || (this.original = this.convert(this.get(), u));
4651    };
4652  }),
4653      P = l(N, function (a, b) {
4654    a.init = function () {
4655      b.init.apply(this, arguments), this.animate = this.fallback;
4656    }, a.get = function () {
4657      return this.$el[this.name]();
4658    }, a.update = function (a) {
4659      this.$el[this.name](a);
4660    };
4661  }),
4662      Q = l(N, function (a, b) {
4663    function c(a, b) {
4664      var c, d, e, f, g;
4665
4666      for (c in a) {
4667        f = Z[c], e = f[0], d = f[1] || c, g = this.convert(a[c], e), b.call(this, d, g, e);
4668      }
4669    }
4670
4671    a.init = function () {
4672      b.init.apply(this, arguments), this.current || (this.current = {}, Z.perspective && U.perspective && (this.current.perspective = U.perspective, V(this.el, this.name, this.style(this.current)), this.redraw()));
4673    }, a.set = function (a) {
4674      c.call(this, a, function (a, b) {
4675        this.current[a] = b;
4676      }), V(this.el, this.name, this.style(this.current)), this.redraw();
4677    }, a.transition = function (a) {
4678      var b = this.values(a);
4679      this.tween = new T({
4680        current: this.current,
4681        values: b,
4682        duration: this.duration,
4683        delay: this.delay,
4684        ease: this.ease
4685      });
4686      var c,
4687          d = {};
4688
4689      for (c in this.current) {
4690        d[c] = c in b ? b[c] : this.current[c];
4691      }
4692
4693      this.active = !0, this.nextStyle = this.style(d);
4694    }, a.fallback = function (a) {
4695      var b = this.values(a);
4696      this.tween = new T({
4697        current: this.current,
4698        values: b,
4699        duration: this.duration,
4700        delay: this.delay,
4701        ease: this.ease,
4702        update: this.update,
4703        context: this
4704      });
4705    }, a.update = function () {
4706      V(this.el, this.name, this.style(this.current));
4707    }, a.style = function (a) {
4708      var b,
4709          c = "";
4710
4711      for (b in a) {
4712        c += b + "(" + a[b] + ") ";
4713      }
4714
4715      return c;
4716    }, a.values = function (a) {
4717      var b,
4718          d = {};
4719      return c.call(this, a, function (a, c, e) {
4720        d[a] = c, void 0 === this.current[a] && (b = 0, ~a.indexOf("scale") && (b = 1), this.current[a] = this.convert(b, e));
4721      }), d;
4722    };
4723  }),
4724      R = l(function (b) {
4725    function c(a) {
4726      1 === n.push(a) && J(g);
4727    }
4728
4729    function g() {
4730      var a,
4731          b,
4732          c,
4733          d = n.length;
4734      if (d) for (J(g), b = K(), a = d; a--;) {
4735        c = n[a], c && c.render(b);
4736      }
4737    }
4738
4739    function i(b) {
4740      var c,
4741          d = a.inArray(b, n);
4742      d >= 0 && (c = n.slice(d + 1), n.length = d, c.length && (n = n.concat(c)));
4743    }
4744
4745    function j(a) {
4746      return Math.round(a * o) / o;
4747    }
4748
4749    function k(a, b, c) {
4750      return e(a[0] + c * (b[0] - a[0]), a[1] + c * (b[1] - a[1]), a[2] + c * (b[2] - a[2]));
4751    }
4752
4753    var l = {
4754      ease: m.ease[1],
4755      from: 0,
4756      to: 1
4757    };
4758    b.init = function (a) {
4759      this.duration = a.duration || 0, this.delay = a.delay || 0;
4760      var b = a.ease || l.ease;
4761      m[b] && (b = m[b][1]), "function" != typeof b && (b = l.ease), this.ease = b, this.update = a.update || f, this.complete = a.complete || f, this.context = a.context || this, this.name = a.name;
4762      var c = a.from,
4763          d = a.to;
4764      void 0 === c && (c = l.from), void 0 === d && (d = l.to), this.unit = a.unit || "", "number" == typeof c && "number" == typeof d ? (this.begin = c, this.change = d - c) : this.format(d, c), this.value = this.begin + this.unit, this.start = K(), a.autoplay !== !1 && this.play();
4765    }, b.play = function () {
4766      this.active || (this.start || (this.start = K()), this.active = !0, c(this));
4767    }, b.stop = function () {
4768      this.active && (this.active = !1, i(this));
4769    }, b.render = function (a) {
4770      var b,
4771          c = a - this.start;
4772
4773      if (this.delay) {
4774        if (c <= this.delay) return;
4775        c -= this.delay;
4776      }
4777
4778      if (c < this.duration) {
4779        var d = this.ease(c, 0, 1, this.duration);
4780        return b = this.startRGB ? k(this.startRGB, this.endRGB, d) : j(this.begin + d * this.change), this.value = b + this.unit, void this.update.call(this.context, this.value);
4781      }
4782
4783      b = this.endHex || this.begin + this.change, this.value = b + this.unit, this.update.call(this.context, this.value), this.complete.call(this.context), this.destroy();
4784    }, b.format = function (a, b) {
4785      if (b += "", a += "", "#" == a.charAt(0)) return this.startRGB = d(b), this.endRGB = d(a), this.endHex = a, this.begin = 0, void (this.change = 1);
4786
4787      if (!this.unit) {
4788        var c = b.replace(r, ""),
4789            e = a.replace(r, "");
4790        c !== e && h("tween", b, a), this.unit = c;
4791      }
4792
4793      b = parseFloat(b), a = parseFloat(a), this.begin = this.value = b, this.change = a - b;
4794    }, b.destroy = function () {
4795      this.stop(), this.context = null, this.ease = this.update = this.complete = f;
4796    };
4797    var n = [],
4798        o = 1e3;
4799  }),
4800      S = l(R, function (a) {
4801    a.init = function (a) {
4802      this.duration = a.duration || 0, this.complete = a.complete || f, this.context = a.context, this.play();
4803    }, a.render = function (a) {
4804      var b = a - this.start;
4805      b < this.duration || (this.complete.call(this.context), this.destroy());
4806    };
4807  }),
4808      T = l(R, function (a, b) {
4809    a.init = function (a) {
4810      this.context = a.context, this.update = a.update, this.tweens = [], this.current = a.current;
4811      var b, c;
4812
4813      for (b in a.values) {
4814        c = a.values[b], this.current[b] !== c && this.tweens.push(new R({
4815          name: b,
4816          from: this.current[b],
4817          to: c,
4818          duration: a.duration,
4819          delay: a.delay,
4820          ease: a.ease,
4821          autoplay: !1
4822        }));
4823      }
4824
4825      this.play();
4826    }, a.render = function (a) {
4827      var b,
4828          c,
4829          d = this.tweens.length,
4830          e = !1;
4831
4832      for (b = d; b--;) {
4833        c = this.tweens[b], c.context && (c.render(a), this.current[c.name] = c.value, e = !0);
4834      }
4835
4836      return e ? void (this.update && this.update.call(this.context)) : this.destroy();
4837    }, a.destroy = function () {
4838      if (b.destroy.call(this), this.tweens) {
4839        var a,
4840            c = this.tweens.length;
4841
4842        for (a = c; a--;) {
4843          this.tweens[a].destroy();
4844        }
4845
4846        this.tweens = null, this.current = null;
4847      }
4848    };
4849  }),
4850      U = b.config = {
4851    debug: !1,
4852    defaultUnit: "px",
4853    defaultAngle: "deg",
4854    keepInherited: !1,
4855    hideBackface: !1,
4856    perspective: "",
4857    fallback: !G.transition,
4858    agentTests: []
4859  };
4860
4861  b.fallback = function (a) {
4862    if (!G.transition) return U.fallback = !0;
4863    U.agentTests.push("(" + a + ")");
4864    var b = new RegExp(U.agentTests.join("|"), "i");
4865    U.fallback = b.test(navigator.userAgent);
4866  }, b.fallback("6.0.[2-5] Safari"), b.tween = function (a) {
4867    return new R(a);
4868  }, b.delay = function (a, b, c) {
4869    return new S({
4870      complete: b,
4871      duration: a,
4872      context: c
4873    });
4874  }, a.fn.tram = function (a) {
4875    return b.call(null, this, a);
4876  };
4877  var V = a.style,
4878      W = a.css,
4879      X = {
4880    transform: G.transform && G.transform.css
4881  },
4882      Y = {
4883    color: [O, u],
4884    background: [O, u, "background-color"],
4885    "outline-color": [O, u],
4886    "border-color": [O, u],
4887    "border-top-color": [O, u],
4888    "border-right-color": [O, u],
4889    "border-bottom-color": [O, u],
4890    "border-left-color": [O, u],
4891    "border-width": [N, v],
4892    "border-top-width": [N, v],
4893    "border-right-width": [N, v],
4894    "border-bottom-width": [N, v],
4895    "border-left-width": [N, v],
4896    "border-spacing": [N, v],
4897    "letter-spacing": [N, v],
4898    margin: [N, v],
4899    "margin-top": [N, v],
4900    "margin-right": [N, v],
4901    "margin-bottom": [N, v],
4902    "margin-left": [N, v],
4903    padding: [N, v],
4904    "padding-top": [N, v],
4905    "padding-right": [N, v],
4906    "padding-bottom": [N, v],
4907    "padding-left": [N, v],
4908    "outline-width": [N, v],
4909    opacity: [N, t],
4910    top: [N, w],
4911    right: [N, w],
4912    bottom: [N, w],
4913    left: [N, w],
4914    "font-size": [N, w],
4915    "text-indent": [N, w],
4916    "word-spacing": [N, w],
4917    width: [N, w],
4918    "min-width": [N, w],
4919    "max-width": [N, w],
4920    height: [N, w],
4921    "min-height": [N, w],
4922    "max-height": [N, w],
4923    "line-height": [N, y],
4924    "scroll-top": [P, t, "scrollTop"],
4925    "scroll-left": [P, t, "scrollLeft"]
4926  },
4927      Z = {};
4928  G.transform && (Y.transform = [Q], Z = {
4929    x: [w, "translateX"],
4930    y: [w, "translateY"],
4931    rotate: [x],
4932    rotateX: [x],
4933    rotateY: [x],
4934    scale: [t],
4935    scaleX: [t],
4936    scaleY: [t],
4937    skew: [x],
4938    skewX: [x],
4939    skewY: [x]
4940  }), G.transform && G.backface && (Z.z = [w, "translateZ"], Z.rotateZ = [x], Z.scaleZ = [t], Z.perspective = [v]);
4941  var $ = /ms/,
4942      _ = /s|\./;
4943  return a.tram = b;
4944}(window.jQuery);
4945
4946/***/ }),
4947/* 92 */
4948/***/ (function(module, exports, __webpack_require__) {
4949
4950var baseFindIndex = __webpack_require__(93),
4951    baseIteratee = __webpack_require__(18),
4952    toInteger = __webpack_require__(111);
4953
4954/* Built-in method references for those with the same name as other `lodash` methods. */
4955var nativeMax = Math.max;
4956
4957/**
4958 * This method is like `_.find` except that it returns the index of the first
4959 * element `predicate` returns truthy for instead of the element itself.
4960 *
4961 * @static
4962 * @memberOf _
4963 * @since 1.1.0
4964 * @category Array
4965 * @param {Array} array The array to inspect.
4966 * @param {Function} [predicate=_.identity] The function invoked per iteration.
4967 * @param {number} [fromIndex=0] The index to search from.
4968 * @returns {number} Returns the index of the found element, else `-1`.
4969 * @example
4970 *
4971 * var users = [
4972 *   { 'user': 'barney',  'active': false },
4973 *   { 'user': 'fred',    'active': false },
4974 *   { 'user': 'pebbles', 'active': true }
4975 * ];
4976 *
4977 * _.findIndex(users, function(o) { return o.user == 'barney'; });
4978 * // => 0
4979 *
4980 * // The `_.matches` iteratee shorthand.
4981 * _.findIndex(users, { 'user': 'fred', 'active': false });
4982 * // => 1
4983 *
4984 * // The `_.matchesProperty` iteratee shorthand.
4985 * _.findIndex(users, ['active', false]);
4986 * // => 0
4987 *
4988 * // The `_.property` iteratee shorthand.
4989 * _.findIndex(users, 'active');
4990 * // => 2
4991 */
4992function findIndex(array, predicate, fromIndex) {
4993  var length = array == null ? 0 : array.length;
4994  if (!length) {
4995    return -1;
4996  }
4997  var index = fromIndex == null ? 0 : toInteger(fromIndex);
4998  if (index < 0) {
4999    index = nativeMax(length + index, 0);
5000  }
5001  return baseFindIndex(array, baseIteratee(predicate, 3), index);
5002}
5003
5004module.exports = findIndex;
5005
5006
vendor: 4,123 bytes, lines 5007-5170
5007/***/ }),
5008/* 93 */
5009/***/ (function(module, exports) {
5010
5011/**
5012 * The base implementation of `_.findIndex` and `_.findLastIndex` without
5013 * support for iteratee shorthands.
5014 *
5015 * @private
5016 * @param {Array} array The array to inspect.
5017 * @param {Function} predicate The function invoked per iteration.
5018 * @param {number} fromIndex The index to search from.
5019 * @param {boolean} [fromRight] Specify iterating from right to left.
5020 * @returns {number} Returns the index of the matched value, else `-1`.
5021 */
5022function baseFindIndex(array, predicate, fromIndex, fromRight) {
5023  var length = array.length,
5024      index = fromIndex + (fromRight ? 1 : -1);
5025
5026  while ((fromRight ? index-- : ++index < length)) {
5027    if (predicate(array[index], index, array)) {
5028      return index;
5029    }
5030  }
5031  return -1;
5032}
5033
5034module.exports = baseFindIndex;
5035
5036
5037/***/ }),
5038/* 94 */
5039/***/ (function(module, exports, __webpack_require__) {
5040
5041var ListCache = __webpack_require__(42),
5042    stackClear = __webpack_require__(164),
5043    stackDelete = __webpack_require__(165),
5044    stackGet = __webpack_require__(166),
5045    stackHas = __webpack_require__(167),
5046    stackSet = __webpack_require__(168);
5047
5048/**
5049 * Creates a stack cache object to store key-value pairs.
5050 *
5051 * @private
5052 * @constructor
5053 * @param {Array} [entries] The key-value pairs to cache.
5054 */
5055function Stack(entries) {
5056  var data = this.__data__ = new ListCache(entries);
5057  this.size = data.size;
5058}
5059
5060// Add methods to `Stack`.
5061Stack.prototype.clear = stackClear;
5062Stack.prototype['delete'] = stackDelete;
5063Stack.prototype.get = stackGet;
5064Stack.prototype.has = stackHas;
5065Stack.prototype.set = stackSet;
5066
5067module.exports = Stack;
5068
5069
5070/***/ }),
5071/* 95 */
5072/***/ (function(module, exports, __webpack_require__) {
5073
5074var baseGetTag = __webpack_require__(24),
5075    isObject = __webpack_require__(12);
5076
5077/** `Object#toString` result references. */
5078var asyncTag = '[object AsyncFunction]',
5079    funcTag = '[object Function]',
5080    genTag = '[object GeneratorFunction]',
5081    proxyTag = '[object Proxy]';
5082
5083/**
5084 * Checks if `value` is classified as a `Function` object.
5085 *
5086 * @static
5087 * @memberOf _
5088 * @since 0.1.0
5089 * @category Lang
5090 * @param {*} value The value to check.
5091 * @returns {boolean} Returns `true` if `value` is a function, else `false`.
5092 * @example
5093 *
5094 * _.isFunction(_);
5095 * // => true
5096 *
5097 * _.isFunction(/abc/);
5098 * // => false
5099 */
5100function isFunction(value) {
5101  if (!isObject(value)) {
5102    return false;
5103  }
5104  // The use of `Object#toString` avoids issues with the `typeof` operator
5105  // in Safari 9 which returns 'object' for typed arrays and other constructors.
5106  var tag = baseGetTag(value);
5107  return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
5108}
5109
5110module.exports = isFunction;
5111
5112
5113/***/ }),
5114/* 96 */
5115/***/ (function(module, exports, __webpack_require__) {
5116
5117/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
5118var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
5119
5120module.exports = freeGlobal;
5121
5122/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44)))
5123
5124/***/ }),
5125/* 97 */
5126/***/ (function(module, exports) {
5127
5128/** Used for built-in method references. */
5129var funcProto = Function.prototype;
5130
5131/** Used to resolve the decompiled source of functions. */
5132var funcToString = funcProto.toString;
5133
5134/**
5135 * Converts `func` to its source code.
5136 *
5137 * @private
5138 * @param {Function} func The function to convert.
5139 * @returns {string} Returns the source code.
5140 */
5141function toSource(func) {
5142  if (func != null) {
5143    try {
5144      return funcToString.call(func);
5145    } catch (e) {}
5146    try {
5147      return (func + '');
5148    } catch (e) {}
5149  }
5150  return '';
5151}
5152
5153module.exports = toSource;
5154
5155
5156/***/ }),
5157/* 98 */
5158/***/ (function(module, exports, __webpack_require__) {
5159
5160var baseIsEqualDeep = __webpack_require__(187),
5161    isObjectLike = __webpack_require__(20);
5162
5163/**
5164 * The base implementation of `_.isEqual` which supports partial comparisons
5165 * and tracks traversed objects.
5166 *
5167 * @private
5168 * @param {*} value The value to compare.
5169 * @param {*} other The other value to compare.
5170 * @param {boolean} bitmask The bitmask flags.
5171 *  1 - Unordered comparison
5172 *  2 - Partial comparison
5173 * @param {Function} [customizer] The function to customize comparisons.
5174 * @param {Object} [stack] Tracks traversed `value` and `other` objects.
5175 * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
5176 */
5177function baseIsEqual(value, other, bitmask, customizer, stack) {
5178  if (value === other) {
5179    return true;
5180  }
5181  if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
5182    return value !== value && other !== other;
5183  }
5184  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
5185}
5186
5187module.exports = baseIsEqual;
5188
5189
5190/***/ }),
5191/* 99 */
5192/***/ (function(module, exports, __webpack_require__) {
5193
5194var SetCache = __webpack_require__(188),
5195    arraySome = __webpack_require__(191),
5196    cacheHas = __webpack_require__(192);
5197
5198/** Used to compose bitmasks for value comparisons. */
5199var COMPARE_PARTIAL_FLAG = 1,
5200    COMPARE_UNORDERED_FLAG = 2;
5201
5202/**
5203 * A specialized version of `baseIsEqualDeep` for arrays with support for
5204 * partial deep comparisons.
5205 *
5206 * @private
5207 * @param {Array} array The array to compare.
5208 * @param {Array} other The other array to compare.
5209 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
5210 * @param {Function} customizer The function to customize comparisons.
5211 * @param {Function} equalFunc The function to determine equivalents of values.
5212 * @param {Object} stack Tracks traversed `array` and `other` objects.
5213 * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
5214 */
5215function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
5216  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
5217      arrLength = array.length,
5218      othLength = other.length;
5219
5220  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
5221    return false;
5222  }
5223  // Check that cyclic values are equal.
5224  var arrStacked = stack.get(array);
5225  var othStacked = stack.get(other);
5226  if (arrStacked && othStacked) {
5227    return arrStacked == other && othStacked == array;
5228  }
5229  var index = -1,
5230      result = true,
5231      seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
5232
5233  stack.set(array, other);
5234  stack.set(other, array);
5235
5236  // Ignore non-index properties.
5237  while (++index < arrLength) {
5238    var arrValue = array[index],
5239        othValue = other[index];
5240
5241    if (customizer) {
5242      var compared = isPartial
5243        ? customizer(othValue, arrValue, index, other, array, stack)
5244        : customizer(arrValue, othValue, index, array, other, stack);
5245    }
5246    if (compared !== undefined) {
5247      if (compared) {
5248        continue;
5249      }
5250      result = false;
vendor: 3,846 bytes, lines 5251-5398
5251      break;
5252    }
5253    // Recursively compare arrays (susceptible to call stack limits).
5254    if (seen) {
5255      if (!arraySome(other, function(othValue, othIndex) {
5256            if (!cacheHas(seen, othIndex) &&
5257                (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
5258              return seen.push(othIndex);
5259            }
5260          })) {
5261        result = false;
5262        break;
5263      }
5264    } else if (!(
5265          arrValue === othValue ||
5266            equalFunc(arrValue, othValue, bitmask, customizer, stack)
5267        )) {
5268      result = false;
5269      break;
5270    }
5271  }
5272  stack['delete'](array);
5273  stack['delete'](other);
5274  return result;
5275}
5276
5277module.exports = equalArrays;
5278
5279
5280/***/ }),
5281/* 100 */
5282/***/ (function(module, exports, __webpack_require__) {
5283
5284var arrayPush = __webpack_require__(60),
5285    isArray = __webpack_require__(2);
5286
5287/**
5288 * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
5289 * `keysFunc` and `symbolsFunc` to get the enumerable property names and
5290 * symbols of `object`.
5291 *
5292 * @private
5293 * @param {Object} object The object to query.
5294 * @param {Function} keysFunc The function to get the keys of `object`.
5295 * @param {Function} symbolsFunc The function to get the symbols of `object`.
5296 * @returns {Array} Returns the array of property names and symbols.
5297 */
5298function baseGetAllKeys(object, keysFunc, symbolsFunc) {
5299  var result = keysFunc(object);
5300  return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
5301}
5302
5303module.exports = baseGetAllKeys;
5304
5305
5306/***/ }),
5307/* 101 */
5308/***/ (function(module, exports, __webpack_require__) {
5309
5310var arrayFilter = __webpack_require__(199),
5311    stubArray = __webpack_require__(102);
5312
5313/** Used for built-in method references. */
5314var objectProto = Object.prototype;
5315
5316/** Built-in value references. */
5317var propertyIsEnumerable = objectProto.propertyIsEnumerable;
5318
5319/* Built-in method references for those with the same name as other `lodash` methods. */
5320var nativeGetSymbols = Object.getOwnPropertySymbols;
5321
5322/**
5323 * Creates an array of the own enumerable symbols of `object`.
5324 *
5325 * @private
5326 * @param {Object} object The object to query.
5327 * @returns {Array} Returns the array of symbols.
5328 */
5329var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
5330  if (object == null) {
5331    return [];
5332  }
5333  object = Object(object);
5334  return arrayFilter(nativeGetSymbols(object), function(symbol) {
5335    return propertyIsEnumerable.call(object, symbol);
5336  });
5337};
5338
5339module.exports = getSymbols;
5340
5341
5342/***/ }),
5343/* 102 */
5344/***/ (function(module, exports) {
5345
5346/**
5347 * This method returns a new empty array.
5348 *
5349 * @static
5350 * @memberOf _
5351 * @since 4.13.0
5352 * @category Util
5353 * @returns {Array} Returns the new empty array.
5354 * @example
5355 *
5356 * var arrays = _.times(2, _.stubArray);
5357 *
5358 * console.log(arrays);
5359 * // => [[], []]
5360 *
5361 * console.log(arrays[0] === arrays[1]);
5362 * // => false
5363 */
5364function stubArray() {
5365  return [];
5366}
5367
5368module.exports = stubArray;
5369
5370
5371/***/ }),
5372/* 103 */
5373/***/ (function(module, exports, __webpack_require__) {
5374
5375var baseTimes = __webpack_require__(200),
5376    isArguments = __webpack_require__(48),
5377    isArray = __webpack_require__(2),
5378    isBuffer = __webpack_require__(61),
5379    isIndex = __webpack_require__(62),
5380    isTypedArray = __webpack_require__(63);
5381
5382/** Used for built-in method references. */
5383var objectProto = Object.prototype;
5384
5385/** Used to check objects for own properties. */
5386var hasOwnProperty = objectProto.hasOwnProperty;
5387
5388/**
5389 * Creates an array of the enumerable property names of the array-like `value`.
5390 *
5391 * @private
5392 * @param {*} value The value to query.
5393 * @param {boolean} inherited Specify returning inherited property names.
5394 * @returns {Array} Returns the array of property names.
5395 */
5396function arrayLikeKeys(value, inherited) {
5397  var isArr = isArray(value),
5398      isArg = !isArr && isArguments(value),
vendor: 6,280 bytes, lines 5399-5666
5399      isBuff = !isArr && !isArg && isBuffer(value),
5400      isType = !isArr && !isArg && !isBuff && isTypedArray(value),
5401      skipIndexes = isArr || isArg || isBuff || isType,
5402      result = skipIndexes ? baseTimes(value.length, String) : [],
5403      length = result.length;
5404
5405  for (var key in value) {
5406    if ((inherited || hasOwnProperty.call(value, key)) &&
5407        !(skipIndexes && (
5408           // Safari 9 has enumerable `arguments.length` in strict mode.
5409           key == 'length' ||
5410           // Node.js 0.10 has enumerable non-index properties on buffers.
5411           (isBuff && (key == 'offset' || key == 'parent')) ||
5412           // PhantomJS 2 has enumerable non-index properties on typed arrays.
5413           (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
5414           // Skip index properties.
5415           isIndex(key, length)
5416        ))) {
5417      result.push(key);
5418    }
5419  }
5420  return result;
5421}
5422
5423module.exports = arrayLikeKeys;
5424
5425
5426/***/ }),
5427/* 104 */
5428/***/ (function(module, exports) {
5429
5430module.exports = function(module) {
5431	if (!module.webpackPolyfill) {
5432		module.deprecate = function() {};
5433		module.paths = [];
5434		// module.parent = undefined by default
5435		if (!module.children) module.children = [];
5436		Object.defineProperty(module, "loaded", {
5437			enumerable: true,
5438			get: function() {
5439				return module.l;
5440			}
5441		});
5442		Object.defineProperty(module, "id", {
5443			enumerable: true,
5444			get: function() {
5445				return module.i;
5446			}
5447		});
5448		module.webpackPolyfill = 1;
5449	}
5450	return module;
5451};
5452
5453
5454/***/ }),
5455/* 105 */
5456/***/ (function(module, exports) {
5457
5458/**
5459 * Creates a unary function that invokes `func` with its argument transformed.
5460 *
5461 * @private
5462 * @param {Function} func The function to wrap.
5463 * @param {Function} transform The argument transform.
5464 * @returns {Function} Returns the new function.
5465 */
5466function overArg(func, transform) {
5467  return function(arg) {
5468    return func(transform(arg));
5469  };
5470}
5471
5472module.exports = overArg;
5473
5474
5475/***/ }),
5476/* 106 */
5477/***/ (function(module, exports, __webpack_require__) {
5478
5479var getNative = __webpack_require__(19),
5480    root = __webpack_require__(10);
5481
5482/* Built-in method references that are verified to be native. */
5483var WeakMap = getNative(root, 'WeakMap');
5484
5485module.exports = WeakMap;
5486
5487
5488/***/ }),
5489/* 107 */
5490/***/ (function(module, exports, __webpack_require__) {
5491
5492var isObject = __webpack_require__(12);
5493
5494/**
5495 * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
5496 *
5497 * @private
5498 * @param {*} value The value to check.
5499 * @returns {boolean} Returns `true` if `value` if suitable for strict
5500 *  equality comparisons, else `false`.
5501 */
5502function isStrictComparable(value) {
5503  return value === value && !isObject(value);
5504}
5505
5506module.exports = isStrictComparable;
5507
5508
5509/***/ }),
5510/* 108 */
5511/***/ (function(module, exports) {
5512
5513/**
5514 * A specialized version of `matchesProperty` for source values suitable
5515 * for strict equality comparisons, i.e. `===`.
5516 *
5517 * @private
5518 * @param {string} key The key of the property to get.
5519 * @param {*} srcValue The value to match.
5520 * @returns {Function} Returns the new spec function.
5521 */
5522function matchesStrictComparable(key, srcValue) {
5523  return function(object) {
5524    if (object == null) {
5525      return false;
5526    }
5527    return object[key] === srcValue &&
5528      (srcValue !== undefined || (key in Object(object)));
5529  };
5530}
5531
5532module.exports = matchesStrictComparable;
5533
5534
5535/***/ }),
5536/* 109 */
5537/***/ (function(module, exports) {
5538
5539/**
5540 * A specialized version of `_.map` for arrays without support for iteratee
5541 * shorthands.
5542 *
5543 * @private
5544 * @param {Array} [array] The array to iterate over.
5545 * @param {Function} iteratee The function invoked per iteration.
5546 * @returns {Array} Returns the new mapped array.
5547 */
5548function arrayMap(array, iteratee) {
5549  var index = -1,
5550      length = array == null ? 0 : array.length,
5551      result = Array(length);
5552
5553  while (++index < length) {
5554    result[index] = iteratee(array[index], index, array);
5555  }
5556  return result;
5557}
5558
5559module.exports = arrayMap;
5560
5561
5562/***/ }),
5563/* 110 */
5564/***/ (function(module, exports) {
5565
5566/**
5567 * The base implementation of `_.property` without support for deep paths.
5568 *
5569 * @private
5570 * @param {string} key The key of the property to get.
5571 * @returns {Function} Returns the new accessor function.
5572 */
5573function baseProperty(key) {
5574  return function(object) {
5575    return object == null ? undefined : object[key];
5576  };
5577}
5578
5579module.exports = baseProperty;
5580
5581
5582/***/ }),
5583/* 111 */
5584/***/ (function(module, exports, __webpack_require__) {
5585
5586var toFinite = __webpack_require__(222);
5587
5588/**
5589 * Converts `value` to an integer.
5590 *
5591 * **Note:** This method is loosely based on
5592 * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
5593 *
5594 * @static
5595 * @memberOf _
5596 * @since 4.0.0
5597 * @category Lang
5598 * @param {*} value The value to convert.
5599 * @returns {number} Returns the converted integer.
5600 * @example
5601 *
5602 * _.toInteger(3.2);
5603 * // => 3
5604 *
5605 * _.toInteger(Number.MIN_VALUE);
5606 * // => 0
5607 *
5608 * _.toInteger(Infinity);
5609 * // => 1.7976931348623157e+308
5610 *
5611 * _.toInteger('3.2');
5612 * // => 3
5613 */
5614function toInteger(value) {
5615  var result = toFinite(value),
5616      remainder = result % 1;
5617
5618  return result === result ? (remainder ? result - remainder : result) : 0;
5619}
5620
5621module.exports = toInteger;
5622
5623
5624/***/ }),
5625/* 112 */
5626/***/ (function(module, exports, __webpack_require__) {
5627
5628var shared = __webpack_require__(51);
5629
5630module.exports = shared('native-function-to-string', Function.toString);
5631
5632
5633/***/ }),
5634/* 113 */
5635/***/ (function(module, exports, __webpack_require__) {
5636
5637var DESCRIPTORS = __webpack_require__(14);
5638var fails = __webpack_require__(8);
5639var createElement = __webpack_require__(114);
5640
5641// Thank's IE8 for his funny defineProperty
5642module.exports = !DESCRIPTORS && !fails(function () {
5643  return Object.defineProperty(createElement('div'), 'a', {
5644    get: function () { return 7; }
5645  }).a != 7;
5646});
5647
5648
5649/***/ }),
5650/* 114 */
5651/***/ (function(module, exports, __webpack_require__) {
5652
5653var global = __webpack_require__(7);
5654var isObject = __webpack_require__(16);
5655
5656var document = global.document;
5657// typeof document.createElement is 'object' in old IE
5658var EXISTS = isObject(document) && isObject(document.createElement);
5659
5660module.exports = function (it) {
5661  return EXISTS ? document.createElement(it) : {};
5662};
5663
5664
5665/***/ }),
5666/* 115 */
vendor: 10,024 bytes, lines 5667-5957
5667/***/ (function(module, exports) {
5668
5669var id = 0;
5670var postfix = Math.random();
5671
5672module.exports = function (key) {
5673  return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
5674};
5675
5676
5677/***/ }),
5678/* 116 */
5679/***/ (function(module, exports, __webpack_require__) {
5680
5681"use strict";
5682
5683var $ = __webpack_require__(0);
5684var createIteratorConstructor = __webpack_require__(236);
5685var getPrototypeOf = __webpack_require__(122);
5686var setPrototypeOf = __webpack_require__(242);
5687var setToStringTag = __webpack_require__(124);
5688var hide = __webpack_require__(21);
5689var redefine = __webpack_require__(118);
5690var wellKnownSymbol = __webpack_require__(5);
5691var IS_PURE = __webpack_require__(77);
5692var Iterators = __webpack_require__(35);
5693var IteratorsCore = __webpack_require__(121);
5694
5695var IteratorPrototype = IteratorsCore.IteratorPrototype;
5696var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
5697var ITERATOR = wellKnownSymbol('iterator');
5698var KEYS = 'keys';
5699var VALUES = 'values';
5700var ENTRIES = 'entries';
5701
5702var returnThis = function () { return this; };
5703
5704module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
5705  createIteratorConstructor(IteratorConstructor, NAME, next);
5706
5707  var getIterationMethod = function (KIND) {
5708    if (KIND === DEFAULT && defaultIterator) return defaultIterator;
5709    if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
5710    switch (KIND) {
5711      case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
5712      case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
5713      case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
5714    } return function () { return new IteratorConstructor(this); };
5715  };
5716
5717  var TO_STRING_TAG = NAME + ' Iterator';
5718  var INCORRECT_VALUES_NAME = false;
5719  var IterablePrototype = Iterable.prototype;
5720  var nativeIterator = IterablePrototype[ITERATOR]
5721    || IterablePrototype['@@iterator']
5722    || DEFAULT && IterablePrototype[DEFAULT];
5723  var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
5724  var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
5725  var CurrentIteratorPrototype, methods, KEY;
5726
5727  // fix native
5728  if (anyNativeIterator) {
5729    CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
5730    if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
5731      if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
5732        if (setPrototypeOf) {
5733          setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
5734        } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
5735          hide(CurrentIteratorPrototype, ITERATOR, returnThis);
5736        }
5737      }
5738      // Set @@toStringTag to native iterators
5739      setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
5740      if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
5741    }
5742  }
5743
5744  // fix Array#{values, @@iterator}.name in V8 / FF
5745  if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
5746    INCORRECT_VALUES_NAME = true;
5747    defaultIterator = function values() { return nativeIterator.call(this); };
5748  }
5749
5750  // define iterator
5751  if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
5752    hide(IterablePrototype, ITERATOR, defaultIterator);
5753  }
5754  Iterators[NAME] = defaultIterator;
5755
5756  // export additional methods
5757  if (DEFAULT) {
5758    methods = {
5759      values: getIterationMethod(VALUES),
5760      keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
5761      entries: getIterationMethod(ENTRIES)
5762    };
5763    if (FORCED) for (KEY in methods) {
5764      if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
5765        redefine(IterablePrototype, KEY, methods[KEY]);
5766      }
5767    } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
5768  }
5769
5770  return methods;
5771};
5772
5773
5774/***/ }),
5775/* 117 */
5776/***/ (function(module, exports, __webpack_require__) {
5777
5778var DESCRIPTORS = __webpack_require__(14);
5779var propertyIsEnumerableModule = __webpack_require__(230);
5780var createPropertyDescriptor = __webpack_require__(52);
5781var toIndexedObject = __webpack_require__(22);
5782var toPrimitive = __webpack_require__(76);
5783var has = __webpack_require__(17);
5784var IE8_DOM_DEFINE = __webpack_require__(113);
5785
5786var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
5787
5788// `Object.getOwnPropertyDescriptor` method
5789// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
5790exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
5791  O = toIndexedObject(O);
5792  P = toPrimitive(P, true);
5793  if (IE8_DOM_DEFINE) try {
5794    return nativeGetOwnPropertyDescriptor(O, P);
5795  } catch (error) { /* empty */ }
5796  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
5797};
5798
5799
5800/***/ }),
5801/* 118 */
5802/***/ (function(module, exports, __webpack_require__) {
5803
5804var global = __webpack_require__(7);
5805var shared = __webpack_require__(51);
5806var hide = __webpack_require__(21);
5807var has = __webpack_require__(17);
5808var setGlobal = __webpack_require__(75);
5809var nativeFunctionToString = __webpack_require__(112);
5810var InternalStateModule = __webpack_require__(74);
5811
5812var getInternalState = InternalStateModule.get;
5813var enforceInternalState = InternalStateModule.enforce;
5814var TEMPLATE = String(nativeFunctionToString).split('toString');
5815
5816shared('inspectSource', function (it) {
5817  return nativeFunctionToString.call(it);
5818});
5819
5820(module.exports = function (O, key, value, options) {
5821  var unsafe = options ? !!options.unsafe : false;
5822  var simple = options ? !!options.enumerable : false;
5823  var noTargetGet = options ? !!options.noTargetGet : false;
5824  if (typeof value == 'function') {
5825    if (typeof key == 'string' && !has(value, 'name')) hide(value, 'name', key);
5826    enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
5827  }
5828  if (O === global) {
5829    if (simple) O[key] = value;
5830    else setGlobal(key, value);
5831    return;
5832  } else if (!unsafe) {
5833    delete O[key];
5834  } else if (!noTargetGet && O[key]) {
5835    simple = true;
5836  }
5837  if (simple) O[key] = value;
5838  else hide(O, key, value);
5839// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
5840})(Function.prototype, 'toString', function toString() {
5841  return typeof this == 'function' && getInternalState(this).source || nativeFunctionToString.call(this);
5842});
5843
5844
5845/***/ }),
5846/* 119 */
5847/***/ (function(module, exports, __webpack_require__) {
5848
5849module.exports = __webpack_require__(7);
5850
5851
5852/***/ }),
5853/* 120 */
5854/***/ (function(module, exports, __webpack_require__) {
5855
5856var has = __webpack_require__(17);
5857var toIndexedObject = __webpack_require__(22);
5858var indexOf = __webpack_require__(82).indexOf;
5859var hiddenKeys = __webpack_require__(79);
5860
5861module.exports = function (object, names) {
5862  var O = toIndexedObject(object);
5863  var i = 0;
5864  var result = [];
5865  var key;
5866  for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
5867  // Don't enum bug & hidden keys
5868  while (names.length > i) if (has(O, key = names[i++])) {
5869    ~indexOf(result, key) || result.push(key);
5870  }
5871  return result;
5872};
5873
5874
5875/***/ }),
5876/* 121 */
5877/***/ (function(module, exports, __webpack_require__) {
5878
5879"use strict";
5880
5881var getPrototypeOf = __webpack_require__(122);
5882var hide = __webpack_require__(21);
5883var has = __webpack_require__(17);
5884var wellKnownSymbol = __webpack_require__(5);
5885var IS_PURE = __webpack_require__(77);
5886
5887var ITERATOR = wellKnownSymbol('iterator');
5888var BUGGY_SAFARI_ITERATORS = false;
5889
5890var returnThis = function () { return this; };
5891
5892// `%IteratorPrototype%` object
5893// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
5894var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
5895
5896if ([].keys) {
5897  arrayIterator = [].keys();
5898  // Safari 8 has buggy iterators w/o `next`
5899  if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
5900  else {
5901    PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
5902    if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
5903  }
5904}
5905
5906if (IteratorPrototype == undefined) IteratorPrototype = {};
5907
5908// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
5909if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) hide(IteratorPrototype, ITERATOR, returnThis);
5910
5911module.exports = {
5912  IteratorPrototype: IteratorPrototype,
5913  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
5914};
5915
5916
5917/***/ }),
5918/* 122 */
5919/***/ (function(module, exports, __webpack_require__) {
5920
5921var has = __webpack_require__(17);
5922var toObject = __webpack_require__(4);
5923var sharedKey = __webpack_require__(78);
5924var CORRECT_PROTOTYPE_GETTER = __webpack_require__(237);
5925
5926var IE_PROTO = sharedKey('IE_PROTO');
5927var ObjectPrototype = Object.prototype;
5928
5929// `Object.getPrototypeOf` method
5930// https://tc39.github.io/ecma262/#sec-object.getprototypeof
5931module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
5932  O = toObject(O);
5933  if (has(O, IE_PROTO)) return O[IE_PROTO];
5934  if (typeof O.constructor == 'function' && O instanceof O.constructor) {
5935    return O.constructor.prototype;
5936  } return O instanceof Object ? ObjectPrototype : null;
5937};
5938
5939
5940/***/ }),
5941/* 123 */
5942/***/ (function(module, exports, __webpack_require__) {
5943
5944var anObject = __webpack_require__(27);
5945var defineProperties = __webpack_require__(239);
5946var enumBugKeys = __webpack_require__(83);
5947var hiddenKeys = __webpack_require__(79);
5948var html = __webpack_require__(241);
5949var documentCreateElement = __webpack_require__(114);
5950var sharedKey = __webpack_require__(78);
5951var IE_PROTO = sharedKey('IE_PROTO');
5952
5953var PROTOTYPE = 'prototype';
5954var Empty = function () { /* empty */ };
5955
5956// Create object with fake `null` prototype: use iframe Object with cleared prototype
5957var createDict = function () {
5958  // Thrash, waste and sodomy: IE GC bug
5959  var iframe = documentCreateElement('iframe');
5960  var length = enumBugKeys.length;
5961  var lt = '<';
5962  var script = 'script';
5963  var gt = '>';
5964  var js = 'java' + script + ':';
5965  var iframeDocument;
5966  iframe.style.display = 'none';
5967  html.appendChild(iframe);
5968  iframe.src = String(js);
5969  iframeDocument = iframe.contentWindow.document;
5970  iframeDocument.open();
5971  iframeDocument.write(lt + script + gt + 'document.F=Object' + lt + '/' + script + gt);
5972  iframeDocument.close();
5973  createDict = iframeDocument.F;
5974  while (length--) delete createDict[PROTOTYPE][enumBugKeys[length]];
5975  return createDict();
5976};
5977
5978// `Object.create` method
5979// https://tc39.github.io/ecma262/#sec-object.create
5980module.exports = Object.create || function create(O, Properties) {
5981  var result;
5982  if (O !== null) {
5983    Empty[PROTOTYPE] = anObject(O);
5984    result = new Empty();
5985    Empty[PROTOTYPE] = null;
5986    // add "__proto__" for Object.getPrototypeOf polyfill
5987    result[IE_PROTO] = O;
5988  } else result = createDict();
5989  return Properties === undefined ? result : defineProperties(result, Properties);
5990};
5991
5992hiddenKeys[IE_PROTO] = true;
5993
5994
5995/***/ }),
5996/* 124 */
5997/***/ (function(module, exports, __webpack_require__) {
5998
5999var defineProperty = __webpack_require__(15).f;
6000var has = __webpack_require__(17);
6001var wellKnownSymbol = __webpack_require__(5);
6002
6003var TO_STRING_TAG = wellKnownSymbol('toStringTag');
6004
6005module.exports = function (it, TAG, STATIC) {
6006  if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
6007    defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
6008  }
6009};
6010
6011
6012/***/ }),
6013/* 125 */
6014/***/ (function(module, exports, __webpack_require__) {
6015
6016"use strict";
6017
6018var isArray = __webpack_require__(28);
6019var toLength = __webpack_require__(3);
6020var bind = __webpack_require__(54);
6021
6022// `FlattenIntoArray` abstract operation
6023// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
6024var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
6025  var targetIndex = start;
6026  var sourceIndex = 0;
6027  var mapFn = mapper ? bind(mapper, thisArg, 3) : false;
6028  var element;
6029
6030  while (sourceIndex < sourceLen) {
6031    if (sourceIndex in source) {
6032      element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
6033
6034      if (depth > 0 && isArray(element)) {
6035        targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
6036      } else {
6037        if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
6038        target[targetIndex] = element;
6039      }
6040
6041      targetIndex++;
6042    }
6043    sourceIndex++;
6044  }
6045  return targetIndex;
6046};
6047
6048module.exports = flattenIntoArray;
6049
6050
6051/***/ }),
6052/* 126 */
6053/***/ (function(module, exports, __webpack_require__) {
6054
6055"use strict";
6056
6057var $ = __webpack_require__(0);
6058var $includes = __webpack_require__(82).includes;
6059var addToUnscopables = __webpack_require__(11);
6060
6061// `Array.prototype.includes` method
6062// https://tc39.github.io/ecma262/#sec-array.prototype.includes
6063$({ target: 'Array', proto: true }, {
6064  includes: function includes(el /* , fromIndex = 0 */) {
6065    return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
6066  }
6067});
6068
6069// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
6070addToUnscopables('includes');
6071
6072
6073/***/ }),
6074/* 127 */
6075/***/ (function(module, exports, __webpack_require__) {
6076
6077var aFunction = __webpack_require__(55);
6078var toObject = __webpack_require__(4);
6079var IndexedObject = __webpack_require__(53);
6080var toLength = __webpack_require__(3);
6081
6082// `Array.prototype.{ reduce, reduceRight }` methods implementation
6083var createMethod = function (IS_RIGHT) {
6084  return function (that, callbackfn, argumentsLength, memo) {
6085    aFunction(callbackfn);
6086    var O = toObject(that);
6087    var self = IndexedObject(O);
6088    var length = toLength(O.length);
6089    var index = IS_RIGHT ? length - 1 : 0;
6090    var i = IS_RIGHT ? -1 : 1;
6091    if (argumentsLength < 2) while (true) {
6092      if (index in self) {
6093        memo = self[index];
6094        index += i;
6095        break;
6096      }
6097      index += i;
6098      if (IS_RIGHT ? index < 0 : length <= index) {
vendor: 4,117 bytes, lines 6099-6217
6099        throw TypeError('Reduce of empty array with no initial value');
6100      }
6101    }
6102    for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
6103      memo = callbackfn(memo, self[index], index, O);
6104    }
6105    return memo;
6106  };
6107};
6108
6109module.exports = {
6110  // `Array.prototype.reduce` method
6111  // https://tc39.github.io/ecma262/#sec-array.prototype.reduce
6112  left: createMethod(false),
6113  // `Array.prototype.reduceRight` method
6114  // https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
6115  right: createMethod(true)
6116};
6117
6118
6119/***/ }),
6120/* 128 */
6121/***/ (function(module, __webpack_exports__, __webpack_require__) {
6122
6123"use strict";
6124__webpack_require__.r(__webpack_exports__);
6125/* harmony import */ var _createStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84);
6126/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return _createStore__WEBPACK_IMPORTED_MODULE_0__["default"]; });
6127
6128/* harmony import */ var _combineReducers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(131);
6129/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return _combineReducers__WEBPACK_IMPORTED_MODULE_1__["default"]; });
6130
6131/* harmony import */ var _bindActionCreators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(133);
6132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bindActionCreators", function() { return _bindActionCreators__WEBPACK_IMPORTED_MODULE_2__["default"]; });
6133
6134/* harmony import */ var _applyMiddleware__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(134);
6135/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "applyMiddleware", function() { return _applyMiddleware__WEBPACK_IMPORTED_MODULE_3__["default"]; });
6136
6137/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85);
6138/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return _compose__WEBPACK_IMPORTED_MODULE_4__["default"]; });
6139
6140/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(132);
6141
6142
6143
6144
6145
6146
6147
6148/*
6149* This is a dummy function to check if the function name has been altered by minification.
6150* If the function has been minified and NODE_ENV !== 'production', warn the user.
6151*/
6152function isCrushed() {}
6153
6154if (false) {}
6155
6156
6157
6158/***/ }),
6159/* 129 */
6160/***/ (function(module, __webpack_exports__, __webpack_require__) {
6161
6162"use strict";
6163__webpack_require__.r(__webpack_exports__);
6164/* harmony import */ var _baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(293);
6165/* harmony import */ var _getPrototype_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(298);
6166/* harmony import */ var _isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(300);
6167
6168
6169
6170
6171/** `Object#toString` result references. */
6172var objectTag = '[object Object]';
6173
6174/** Used for built-in method references. */
6175var funcProto = Function.prototype,
6176    objectProto = Object.prototype;
6177
6178/** Used to resolve the decompiled source of functions. */
6179var funcToString = funcProto.toString;
6180
6181/** Used to check objects for own properties. */
6182var hasOwnProperty = objectProto.hasOwnProperty;
6183
6184/** Used to infer the `Object` constructor. */
6185var objectCtorString = funcToString.call(Object);
6186
6187/**
6188 * Checks if `value` is a plain object, that is, an object created by the
6189 * `Object` constructor or one with a `[[Prototype]]` of `null`.
6190 *
6191 * @static
6192 * @memberOf _
6193 * @since 0.8.0
6194 * @category Lang
6195 * @param {*} value The value to check.
6196 * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
6197 * @example
6198 *
6199 * function Foo() {
6200 *   this.a = 1;
6201 * }
6202 *
6203 * _.isPlainObject(new Foo);
6204 * // => false
6205 *
6206 * _.isPlainObject([1, 2, 3]);
6207 * // => false
6208 *
6209 * _.isPlainObject({ 'x': 0, 'y': 0 });
6210 * // => true
6211 *
6212 * _.isPlainObject(Object.create(null));
6213 * // => true
6214 */
6215function isPlainObject(value) {
6216  if (!Object(_isObjectLike_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value) || Object(_baseGetTag_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value) != objectTag) {
6217    return false;
6218  }
6219  var proto = Object(_getPrototype_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value);
6220  if (proto === null) {
6221    return true;
6222  }
6223  var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
6224  return typeof Ctor == 'function' && Ctor instanceof Ctor &&
6225    funcToString.call(Ctor) == objectCtorString;
6226}
6227
6228/* harmony default export */ __webpack_exports__["default"] = (isPlainObject);
6229
6230
6231/***/ }),
6232/* 130 */
6233/***/ (function(module, __webpack_exports__, __webpack_require__) {
6234
6235"use strict";
6236__webpack_require__.r(__webpack_exports__);
6237/* harmony import */ var _root_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(294);
6238
6239
6240/** Built-in value references. */
6241var Symbol = _root_js__WEBPACK_IMPORTED_MODULE_0__["default"].Symbol;
6242
6243/* harmony default export */ __webpack_exports__["default"] = (Symbol);
6244
6245
6246/***/ }),
6247/* 131 */
6248/***/ (function(module, __webpack_exports__, __webpack_require__) {
6249
6250"use strict";
6251__webpack_require__.r(__webpack_exports__);
6252/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return combineReducers; });
6253/* harmony import */ var _createStore__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84);
6254/* harmony import */ var lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(129);
6255/* harmony import */ var _utils_warning__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(132);
6256
6257
6258
6259
6260function getUndefinedStateErrorMessage(key, action) {
6261  var actionType = action && action.type;
6262  var actionName = actionType && '"' + actionType.toString() + '"' || 'an action';
6263
6264  return 'Given action ' + actionName + ', reducer "' + key + '" returned undefined. ' + 'To ignore an action, you must explicitly return the previous state.';
6265}
6266
6267function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unex
6267pectedKeyCache) {
6268  var reducerKeys = Object.keys(reducers);
6269  var argumentName = action && action.type === _createStore__WEBPACK_IMPORTED_MODULE_0__["ActionTypes"].INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
6270
6271  if (reducerKeys.length === 0) {
6272    return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
6273  }
6274
6275  if (!Object(lodash_es_isPlainObject__WEBPACK_IMPORTED_MODULE_1__["default"])(inputState)) {
6276    return 'The ' + argumentName + ' has unexpected type of "' + {}.toString.call(inputState).match(/\s([a-z|A-Z]+)/)[1] + '". Expected argument to be an object with the following ' + ('keys: "' + reducerKeys.join('", "') + '"');
6277  }
6278
6279  var unexpectedKeys = Object.keys(inputState).filter(function (key) {
6280    return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
6281  });
6282
6283  unexpectedKeys.forEach(function (key) {
6284    unexpectedKeyCache[key] = true;
6285  });
6286
6287  if (unexpectedKeys.length > 0) {
6288    return 'Unexpected ' + (unexpectedKeys.length > 1 ? 'keys' : 'key') + ' ' + ('"' + unexpectedKeys.join('", "') + '" found in ' + argumentName + '. ') + 'Expected to find one of the known reducer keys instead: ' + ('"' + reducerKeys.join('", "') + '". Unexpected keys will be ignored.');
6289  }
6290}
6291
6292function assertReducerSanity(reducers) {
6293  Object.keys(reducers).forEach(function (key) {
6294    var reducer = reducers[key];
6295    var initialState = reducer(undefined, { type: _createStore__WEBPACK_IMPORTED_MODULE_0__["ActionTypes"].INIT });
6296
6297    if (typeof initialState === 'undefined') {
6298      throw new Error('Reducer "' + key + '" returned undefined during initialization. ' + 'If the state passed to the reducer is undefined, you must ' + 'explicitly return the initial state. The initial state may ' + 'not be undefined.');
6299    }
6300
6301    var type = '@@redux/PROBE_UNKNOWN_ACTION_' + Math.random().toString(36).substring(7).split('').join('.');
6302    if (typeof reducer(undefined, { type: type }) === 'undefined') {
6303      throw new Error('Reducer "' + key + '" returned undefined when probed with a random type. ' + ('Don\'t try to handle ' + _createStore__WEBPACK_IMPORTED_MODULE_0__["ActionTypes"].INIT + ' or other actions in "redux/*" ') + 'namespace. They are considered private. Instead, you must return the ' + 'current state for any unknown actions, unless it is undefined, ' + 'in which case you must return the initial state, regardless of the ' + 'action type. The initial state may not be undefined.');
6304    }
6305  });
6306}
6307
6308/**
6309 * Turns an object whose values are different reducer functions, into a single
6310 * reducer function. It will call every child reducer, and gather their results
6311 * into a single state object, whose keys correspond to the keys of the passed
6312 * reducer functions.
6313 *
6314 * @param {Object} reducers An object whose values correspond to different
6315 * reducer functions that need to be combined into one. One handy way to obtain
6316 * it is to use ES6 `import * as reducers` syntax. The reducers may never return
6317 * undefined for any action. Instead, they should return their initial state
6318 * if the state passed to them was undefined, and the current state for any
6319 * unrecognized action.
6320 *
6321 * @returns {Function} A reducer function that invokes every reducer inside the
6322 * passed object, and builds a state object with the same shape.
6323 */
6324function combineReducers(reducers) {
6325  var reducerKeys = Object.keys(reducers);
6326  var finalReducers = {};
6327  for (var i = 0; i < reducerKeys.length; i++) {
6328    var key = reducerKeys[i];
6329
6330    if (false) {}
6331
6332    if (typeof reducers[key] === 'function') {
6333      finalReducers[key] = reducers[key];
6334    }
6335  }
6336  var finalReducerKeys = Object.keys(finalReducers);
6337
6338  if (false) { var unexpectedKeyCache; }
6339
6340  var sanityError;
6341  try {
6342    assertReducerSanity(finalReducers);
6343  } catch (e) {
6344    sanityError = e;
6345  }
6346
6347  return function combination() {
6348    var state = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
6349    var action = arguments[1];
6350
6351    if (sanityError) {
6352      throw sanityError;
6353    }
6354
6355    if (false) { var warningMessage; }
6356
6357    var hasChanged = false;
6358    var nextState = {};
6359    for (var i = 0; i < finalReducerKeys.length; i++) {
6360      var key = finalReducerKeys[i];
6361      var reducer = finalReducers[key];
6362      var previousStateForKey = state[key];
6363      var nextStateForKey = reducer(previousStateForKey, action);
6364      if (typeof nextStateForKey === 'undefined') {
6365        var errorMessage = getUndefinedStateErrorMessage(key, action);
6366        throw new Error(errorMessage);
6367      }
6368      nextState[key] = nextStateForKey;
6369      hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
6370    }
6371    return hasChanged ? nextState : state;
6372  };
6373}
6374
6375/***/ }),
6376/* 132 */
6377/***/ (function(module, __webpack_exports__, __webpack_require__) {
6378
6379"use strict";
6380__webpack_require__.r(__webpack_exports__);
6381/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return warning; });
6382/**
6383 * Prints a warning in the console if it exists.
6384 *
6385 * @param {String} message The warning message.
6386 * @returns {void}
6387 */
6388function warning(message) {
6389  /* eslint-disable no-console */
6390  if (typeof console !== 'undefined' && typeof console.error === 'function') {
6391    console.error(message);
6392  }
6393  /* eslint-enable no-console */
6394  try {
6395    // This error was thrown as a convenience so that if you enable
6396    // "break on all exceptions" in your console,
6397    // it would pause the execution at this line.
6398    throw new Error(message);
6399    /* eslint-disable no-empty */
6400  } catch (e) {}
6401  /* eslint-enable no-empty */
6402}
6403
6404/***/ }),
6405/* 133 */
6406/***/ (function(module, __webpack_exports__, __webpack_require__) {
6407
6408"use strict";
6409__webpack_require__.r(__webpack_exports__);
6410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return bindActionCreators; });
6411function bindActionCreator(actionCreator, dispatch) {
6412  return function () {
6413    return dispatch(actionCreator.apply(undefined, arguments));
6414  };
6415}
6416
6417/**
6418 * Turns an object whose values are action creators, into an object with the
6419 * same keys, but with every function wrapped into a `dispatch` call so they
6420 * may be invoked directly. This is just a convenience method, as you can call
6421 * `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
6422 *
6423 * For convenience, you can also pass a single function as the first argument,
6424 * and get a function in return.
6425 *
6426 * @param {Function|Object} actionCreators An object whose values are action
6427 * creator functions. One handy way to obtain it is to use ES6 `import * as`
6428 * syntax. You may also pass a single function.
6429 *
6430 * @param {Function} dispatch The `dispatch` function available on your Redux
6431 * store.
6432 *
6433 * @returns {Function|Object} The object mimicking the original object, but with
6434 * every action creator wrapped into the `dispatch` call. If you passed a
6435 * function as `actionCreators`, the return value will also be a single
6436 * function.
6437 */
6438function bindActionCreators(actionCreators, dispatch) {
6439  if (typeof actionCreators === 'function') {
6440    return bindActionCreator(actionCreators, dispatch);
6441  }
6442
6443  if (typeof actionCreators !== 'object' || actionCreators === null) {
6444    throw new Error('bindActionCreators expected an object or a function, instead received ' + (actionCreators === null ? 'null' : typeof actionCreators) + '. ' + 'Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?');
6445  }
6446
6447  var keys = Object.keys(actionCreators);
6448  var boundActionCreators = {};
6449  for (var i = 0; i < keys.length; i++) {
6450    var key = keys[i];
6451    var actionCreator = actionCreators[key];
6452    if (typeof actionCreator === 'function') {
6453      boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
6454    }
6455  }
6456  return boundActionCreators;
6457}
6458
6459/***/ }),
6460/* 134 */
6461/***/ (function(module, __webpack_exports__, __webpack_require__) {
6462
6463"use strict";
6464__webpack_require__.r(__webpack_exports__);
6465/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return applyMiddleware; });
6466/* harmony import */ var _compose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85);
6467var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
6468
6469
6470
6471/**
6472 * Creates a store enhancer that applies middleware to the dispatch method
6473 * of the Redux store. This is handy for a variety of tasks, such as expressing
6474 * asynchronous actions in a concise manner, or logging every action payload.
6475 *
6476 * See `redux-thunk` package as an example of the Redux middleware.
6477 *
6478 * Because middleware is potentially asynchronous, this should be the first
6479 * store enhancer in the composition chain.
6480 *
6481 * Note that each middleware will be given the `dispatch` and `getState` functions
6482 * as named arguments.
6483 *
6484 * @param {...Function} middlewares The middleware chain to be applied.
6485 * @returns {Function} A store enhancer applying the middleware.
6486 */
6487function applyMiddleware() {
6488  for (var _len = arguments.length, middlewares = Array(_len), _key = 0; _key < _len; _key++) {
6489    middlewares[_key] = arguments[_key];
6490  }
6491
6492  return function (createStore) {
6493    return function (reducer, preloadedState, enhancer) {
6494      var store = createStore(reducer, preloadedState, enhancer);
6495      var _dispatch = store.dispatch;
6496      var chain = [];
6497
6498      var middlewareAPI = {
6499        getState: store.getState,
6500        dispatch: function dispatch(action) {
6501          return _dispatch(action);
6502        }
6503      };
6504      chain = middlewares.map(function (middleware) {
6505        return middleware(middlewareAPI);
6506      });
6507      _dispatch = _compose__WEBPACK_IMPORTED_MODULE_0__["default"].apply(undefined, chain)(store.dispatch);
6508
6509      return _extends({}, store, {
6510        dispatch: _dispatch
6511      });
6512    };
6513  };
6514}
6515
6516/***/ }),
6517/* 135 */
6518/***/ (function(module, exports, __webpack_require__) {
6519
6520var createFind = __webpack_require__(136),
6521    findIndex = __webpack_require__(92);
6522
6523/**
6524 * Iterates over elements of `collection`, returning the first element
6525 * `predicate` returns truthy for. The predicate is invoked with three
6526 * arguments: (value, index|key, collection).
6527 *
6528 * @static
6529 * @memberOf _
6530 * @since 0.1.0
6531 * @category Collection
6532 * @param {Array|Object} collection The collection to inspect.
6533 * @param {Function} [predicate=_.identity] The function invoked per iteration.
6534 * @param {number} [fromIndex=0] The index to search from.
6535 * @returns {*} Returns the matched element, else `undefined`.
6536 * @example
6537 *
6538 * var users = [
6539 *   { 'user': 'barney',  'age': 36, 'active': true },
6540 *   { 'user': 'fred',    'age': 40, 'active': false },
6541 *   { 'user': 'pebbles', 'age': 1,  'active': true }
6542 * ];
6543 *
6544 * _.find(users, function(o) { return o.age < 40; });
6545 * // => object for 'barney'
6546 *
6547 * // The `_.matches` iteratee shorthand.
6548 * _.find(users, { 'age': 1, 'active': true });
6549 * // => object for 'pebbles'
6550 *
6551 * // The `_.matchesProperty` iteratee shorthand.
6552 * _.find(users, ['active', false]);
6553 * // => object for 'fred'
6554 *
6555 * // The `_.property` iteratee shorthand.
6556 * _.find(users, 'active');
6557 * // => object for 'barney'
6558 */
6559var find = createFind(findIndex);
6560
6561module.exports = find;
6562
6563
6564/***/ }),
6565/* 136 */
6566/***/ (function(module, exports, __webpack_require__) {
6567
6568var baseIteratee = __webpack_require__(18),
6569    isArrayLike = __webpack_require__(25),
6570    keys = __webpack_require__(47);
6571
6572/**
6573 * Creates a `_.find` or `_.findLast` function.
6574 *
6575 * @private
6576 * @param {Function} findIndexFunc The function to find the collection index.
6577 * @returns {Function} Returns the new find function.
6578 */
6579function createFind(findIndexFunc) {
6580  return function(collection, predicate, fromIndex) {
6581    var iterable = Object(collection);
6582    if (!isArrayLike(collection)) {
6583      var iteratee = baseIteratee(predicate, 3);
6584      collection = keys(collection);
6585      predicate = function(key) { return iteratee(iterable[key], key, iterable); };
6586    }
6587    var index = findIndexFunc(collection, predicate, fromIndex);
6588    return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
6589  };
6590}
6591
6592module.exports = createFind;
6593
6594
6595/***/ }),
6596/* 137 */
6597/***/ (function(module, exports, __webpack_require__) {
6598
6599"use strict";
6600
6601
6602var _interopRequireDefault = __webpack_require__(1);
6603
6604Object.defineProperty(exports, "__esModule", {
6605  value: true
6606});
6607exports.inQuad = inQuad;
6608exports.outQuad = outQuad;
6609exports.inOutQuad = inOutQuad;
6610exports.inCubic = inCubic;
6611exports.outCubic = outCubic;
6612exports.inOutCubic = inOutCubic;
6613exports.inQuart = inQuart;
6614exports.outQuart = outQuart;
6615exports.inOutQuart = inOutQuart;
6616exports.inQuint = inQuint;
6617exports.outQuint = outQuint;
6618exports.inOutQuint = inOutQuint;
6619exports.inSine = inSine;
6620exports.outSine = outSine;
6621exports.inOutSine = inOutSine;
6622exports.inExpo = inExpo;
6623exports.outExpo = outExpo;
6624exports.inOutExpo = inOutExpo;
6625exports.inCirc = inCirc;
6626exports.outCirc = outCirc;
6627exports.inOutCirc = inOutCirc;
6628exports.outBounce = outBounce;
6629exports.inBack = inBack;
6630exports.outBack = outBack;
6631exports.inOutBack = inOutBack;
6632exports.inElastic = inElastic;
6633exports.outElastic = outElastic;
6634exports.inOutElastic = inOutElastic;
6635exports.swingFromTo = swingFromTo;
6636exports.swingFrom = swingFrom;
6637exports.swingTo = swingTo;
6638exports.bounce = bounce;
6639exports.bouncePast = bouncePast;
6640exports.easeInOut = exports.easeOut = exports.easeIn = exports.ease = void 0;
6641
6642var _bezierEasing = _interopRequireDefault(__webpack_require__(138)); // Easing functions adapted from Thomas Fuchs & Jeremy Kahn
6643// Easing Equations (c) 2003 Robert Penner, BSD license
6644// https://raw.github.com/danro/easing-js/master/LICENSE
6645
6646
6647var magicSwing = 1.70158;
6648var ease = (0, _bezierEasing["default"])(0.25, 0.1, 0.25, 1.0);
6649exports.ease = ease;
6650var easeIn = (0, _bezierEasing["default"])(0.42, 0.0, 1.0, 1.0);
6651exports.easeIn = easeIn;
6652var easeOut = (0, _bezierEasing["default"])(0.0, 0.0, 0.58, 1.0);
6653exports.easeOut = easeOut;
6654var easeInOut = (0, _bezierEasing["default"])(0.42, 0.0, 0.58, 1.0);
6655exports.easeInOut = easeInOut;
6656
6657function inQuad(pos) {
6658  return Math.pow(pos, 2);
6659}
6660
6661function outQuad(pos) {
6662  return -(Math.pow(pos - 1, 2) - 1);
6663}
6664
6665function inOutQuad(pos) {
6666  if ((pos /= 0.5) < 1) {
6667    return 0.5 * Math.pow(pos, 2);
6668  }
6669
6670  return -0.5 * ((pos -= 2) * pos - 2);
6671}
6672
6673function inCubic(pos) {
6674  return Math.pow(pos, 3);
6675}
6676
6677function outCubic(pos) {
6678  return Math.pow(pos - 1, 3) + 1;
6679}
6680
6681function inOutCubic(pos) {
6682  if ((pos /= 0.5) < 1) {
6683    return 0.5 * Math.pow(pos, 3);
6684  }
6685
6686  return 0.5 * (Math.pow(pos - 2, 3) + 2);
6687}
6688
6689function inQuart(pos) {
6690  return Math.pow(pos, 4);
6691}
6692
6693function outQuart(pos) {
6694  return -(Math.pow(pos - 1, 4) - 1);
6695}
6696
6697function inOutQuart(pos) {
6698  if ((pos /= 0.5) < 1) {
6699    return 0.5 * Math.pow(pos, 4);
6700  }
6701
6702  return -0.5 * ((pos -= 2) * Math.pow(pos, 3) - 2);
6703}
6704
6705function inQuint(pos) {
6706  return Math.pow(pos, 5);
6707}
6708
6709function outQuint(pos) {
6710  return Math.pow(pos - 1, 5) + 1;
6711}
6712
6713function inOutQuint(pos) {
6714  if ((pos /= 0.5) < 1) {
6715    return 0.5 * Math.pow(pos, 5);
6716  }
6717
6718  return 0.5 * (Math.pow(pos - 2, 5) + 2);
6719}
6720
6721function inSine(pos) {
6722  return -Math.cos(pos * (Math.PI / 2)) + 1;
6723}
6724
6725function outSine(pos) {
6726  return Math.sin(pos * (Math.PI / 2));
6727}
6728
6729function inOutSine(pos) {
6730  return -0.5 * (Math.cos(Math.PI * pos) - 1);
6731}
6732
6733function inExpo(pos) {
6734  return pos === 0 ? 0 : Math.pow(2, 10 * (pos - 1));
6735}
6736
6737function outExpo(pos) {
6738  return pos === 1 ? 1 : -Math.pow(2, -10 * pos) + 1;
6739}
6740
6741function inOutExpo(pos) {
6742  if (pos === 0) {
6743    return 0;
6744  }
6745
6746  if (pos === 1) {
6747    return 1;
6748  }
6749
6750  if ((pos /= 0.5) < 1) {
6751    return 0.5 * Math.pow(2, 10 * (pos - 1));
6752  }
6753
6754  return 0.5 * (-Math.pow(2, -10 * --pos) + 2);
6755}
6756
6757function inCirc(pos) {
6758  return -(Math.sqrt(1 - pos * pos) - 1);
6759}
6760
6761function outCirc(pos) {
6762  return Math.sqrt(1 - Math.pow(pos - 1, 2));
6763}
6764
6765function inOutCirc(pos) {
6766  if ((pos /= 0.5) < 1) {
6767    return -0.5 * (Math.sqrt(1 - pos * pos) - 1);
6768  }
6769
6770  return 0.5 * (Math.sqrt(1 - (pos -= 2) * pos) + 1);
6771}
6772
6773function outBounce(pos) {
6774  if (pos < 1 / 2.75) {
6775    return 7.5625 * pos * pos;
6776  } else if (pos < 2 / 2.75) {
6777    return 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75;
6778  } else if (pos < 2.5 / 2.75) {
6779    return 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375;
6780  } else {
6781    return 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375;
6782  }
6783}
6784
6785function inBack(pos) {
6786  var s = magicSwing;
6787  return pos * pos * ((s + 1) * pos - s);
6788}
6789
6790function outBack(pos) {
6791  var s = magicSwing;
6792  return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;
6793}
6794
6795function inOutBack(pos) {
6796  var s = magicSwing;
6797
6798  if ((pos /= 0.5) < 1) {
6799    return 0.5 * (pos * pos * (((s *= 1.525) + 1) * pos - s));
6800  }
6801
6802  return 0.5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);
6803}
6804
6805function inElastic(pos) {
6806  var s = magicSwing;
6807  var p = 0;
6808  var a = 1;
6809
6810  if (pos === 0) {
6811    return 0;
6812  }
6813
6814  if (pos === 1) {
6815    return 1;
6816  }
6817
6818  if (!p) {
6819    p = 0.3;
6820  }
6821
6822  if (a < 1) {
6823    a = 1;
6824    s = p / 4;
6825  } else {
6826    s = p / (2 * Math.PI) * Math.asin(1 / a);
6827  }
6828
6829  return -(a * Math.pow(2, 10 * (pos -= 1)) * Math.sin((pos - s) * (2 * Math.PI) / p));
6830}
6831
6832function outElastic(pos) {
6833  var s = magicSwing;
6834  var p = 0;
6835  var a = 1;
6836
6837  if (pos === 0) {
6838    return 0;
6839  }
6840
6841  if (pos === 1) {
6842    return 1;
6843  }
6844
6845  if (!p) {
6846    p = 0.3;
6847  }
6848
6849  if (a < 1) {
6850    a = 1;
6851    s = p / 4;
6852  } else {
6853    s = p / (2 * Math.PI) * Math.asin(1 / a);
6854  }
6855
6856  return a * Math.pow(2, -10 * pos) * Math.sin((pos - s) * (2 * Math.PI) / p) + 1;
6857}
6858
6859function inOutElastic(pos) {
6860  var s = magicSwing;
6861  var p = 0;
6862  var a = 1;
6863
6864  if (pos === 0) {
6865    return 0;
6866  }
6867
6868  if ((pos /= 1 / 2) === 2) {
6869    return 1;
6870  }
6871
6872  if (!p) {
6873    p = 0.3 * 1.5;
6874  }
6875
6876  if (a < 1) {
6877    a = 1;
6878    s = p / 4;
6879  } else {
6880    s = p / (2 * Math.PI) * Math.asin(1 / a);
6881  }
6882
6883  if (pos < 1) {
6884    return -0.5 * (a * Math.pow(2, 10 * (pos -= 1)) * Math.sin((pos - s) * (2 * Math.PI) / p));
6885  }
6886
6887  return a * Math.pow(2, -10 * (pos -= 1)) * Math.sin((pos - s) * (2 * Math.PI) / p) * 0.5 + 1;
6888}
6889
6890function swingFromTo(pos) {
6891  var s = magicSwing;
6892  return (pos /= 0.5) < 1 ? 0.5 * (pos * pos * (((s *= 1.525) + 1) * pos - s)) : 0.5 * ((pos -= 2) * pos * (((s *= 1.525) + 1) * pos + s) + 2);
6893}
6894
6895function swingFrom(pos) {
6896  var s = magicSwing;
6897  return pos * pos * ((s + 1) * pos - s);
6898}
6899
6900function swingTo(pos) {
6901  var s = magicSwing;
6902  return (pos -= 1) * pos * ((s + 1) * pos + s) + 1;
6903}
6904
6905function bounce(pos) {
6906  if (pos < 1 / 2.75) {
6907    return 7.5625 * pos * pos;
6908  } else if (pos < 2 / 2.75) {
6909    return 7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75;
6910  } else if (pos < 2.5 / 2.75) {
6911    return 7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375;
6912  } else {
6913    return 7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375;
6914  }
6915}
6916
6917function bouncePast(pos) {
6918  if (pos < 1 / 2.75) {
6919    return 7.5625 * pos * pos;
6920  } else if (pos < 2 / 2.75) {
6921    return 2 - (7.5625 * (pos -= 1.5 / 2.75) * pos + 0.75);
6922  } else if (pos < 2.5 / 2.75) {
6923    return 2 - (7.5625 * (pos -= 2.25 / 2.75) * pos + 0.9375);
6924  } else {
6925    return 2 - (7.5625 * (pos -= 2.625 / 2.75) * pos + 0.984375);
6926  }
6927}
6928
6929/***/ }),
6930/* 138 */
6931/***/ (function(module, exports) {
6932
6933/**
6934 * https://github.com/gre/bezier-easing
6935 * BezierEasing - use bezier curve for transition easing function
6936 * by Gaëtan Renaudeau 2014 - 2015 – MIT License
6937 */
6938
6939// These values are established by empiricism with tests (tradeoff: performance VS precision)
6940var NEWTON_ITERATIONS = 4;
6941var NEWTON_MIN_SLOPE = 0.001;
6942var SUBDIVISION_PRECISION = 0.0000001;
6943var SUBDIVISION_MAX_ITERATIONS = 10;
6944
6945var kSplineTableSize = 11;
6946var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
6947
6948var float32ArraySupported = typeof Float32Array === 'function';
6949
6950function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
6951function B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
6952function C (aA1)      { return 3.0 * aA1; }
6953
6954// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
6955function calcBezier (aT, aA1, aA2) { return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT; }
6956
6957// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
6958function getSlope (aT, aA1, aA2) { return 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1); }
6959
6960function binarySubdivide (aX, aA, aB, mX1, mX2) {
6961  var currentX, currentT, i = 0;
6962  do {
6963    currentT = aA + (aB - aA) / 2.0;
6964    currentX = calcBezier(currentT, mX1, mX2) - aX;
6965    if (currentX > 0.0) {
6966      aB = currentT;
6967    } else {
6968      aA = currentT;
6969    }
6970  } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
6971  return currentT;
6972}
6973
6974function newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {
6975 for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
6976   var currentSlope = getSlope(aGuessT, mX1, mX2);
6977   if (currentSlope === 0.0) {
6978     return aGuessT;
6979   }
6980   var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
6981   aGuessT -= currentX / currentSlope;
6982 }
6983 return aGuessT;
6984}
6985
6986module.exports = function bezier (mX1, mY1, mX2, mY2) {
6987  if (!(0 <= mX1 && mX1 <= 1 && 0 <= mX2 && mX2 <= 1)) {
6988    throw new Error('bezier x values must be in [0, 1] range');
6989  }
6990
6991  // Precompute samples table
6992  var sampleValues = float32ArraySupported ? new Float32Array(kS
6992plineTableSize) : new Array(kSplineTableSize);
6993  if (mX1 !== mY1 || mX2 !== mY2) {
6994    for (var i = 0; i < kSplineTableSize; ++i) {
6995      sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
6996    }
6997  }
6998
6999  function getTForX (aX) {
7000    var intervalStart = 0.0;
7001    var currentSample = 1;
7002    var lastSample = kSplineTableSize - 1;
7003
7004    for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
7005      intervalStart += kSampleStepSize;
7006    }
7007    --currentSample;
7008
7009    // Interpolate to provide an initial guess for t
7010    var dist = (aX - sampleValues[currentSample]) / (sampleValues[currentSample + 1] - sampleValues[currentSample]);
7011    var guessForT = intervalStart + dist * kSampleStepSize;
7012
7013    var initialSlope = getSlope(guessForT, mX1, mX2);
7014    if (initialSlope >= NEWTON_MIN_SLOPE) {
7015      return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
7016    } else if (initialSlope === 0.0) {
7017      return guessForT;
7018    } else {
7019      return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
7020    }
7021  }
7022
7023  return function BezierEasing (x) {
7024    if (mX1 === mY1 && mX2 === mY2) {
7025      return x; // linear
7026    }
7027    // Because JavaScript number are imprecise, we should guarantee the extremes are right.
7028    if (x === 0) {
7029      return 0;
7030    }
7031    if (x === 1) {
7032      return 1;
7033    }
7034    return calcBezier(getTForX(x), mY1, mY2);
7035  };
7036};
7037
7038
7039/***/ }),
7040/* 139 */
7041/***/ (function(module, exports, __webpack_require__) {
7042
7043"use strict";
7044
7045
7046var _interopRequireDefault2 = __webpack_require__(1);
7047
7048var _toConsumableArray2 = _interopRequireDefault2(__webpack_require__(140));
7049
7050var _interopRequireDefault = __webpack_require__(1);
7051
7052var _interopRequireWildcard = __webpack_require__(39);
7053
7054Object.defineProperty(exports, "__esModule", {
7055  value: true
7056});
7057exports.optimizeFloat = optimizeFloat;
7058exports.createBezierEasing = createBezierEasing;
7059exports.applyEasing = applyEasing;
7060
7061var easings = _interopRequireWildcard(__webpack_require__(137));
7062
7063var _bezierEasing = _interopRequireDefault(__webpack_require__(138));
7064
7065function optimizeFloat(value) {
7066  var digits = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 5;
7067  var base = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 10;
7068  var pow = Math.pow(base, digits);
7069
7070  var _float = Number(Math.round(value * pow) / pow);
7071
7072  return Math.abs(_float) > 0.0001 ? _float : 0;
7073}
7074
7075function createBezierEasing(easing) {
7076  return (0, _bezierEasing["default"]).apply(void 0, (0, _toConsumableArray2["default"])(easing));
7077}
7078
7079function applyEasing(easing, position, customEasingFn) {
7080  if (position === 0) {
7081    return 0;
7082  }
7083
7084  if (position === 1) {
7085    return 1;
7086  }
7087
7088  if (customEasingFn) {
7089    return optimizeFloat(position > 0 ? customEasingFn(position) : position);
7090  }
7091
7092  return optimizeFloat(position > 0 && easing && easings[easing] ? easings[easing](position) : position);
7093}
7094
7095/***/ }),
7096/* 140 */
7097/***/ (function(module, exports, __webpack_require__) {
7098
7099var arrayWithoutHoles = __webpack_require__(313);
7100
7101var iterableToArray = __webpack_require__(314);
7102
7103var nonIterableSpread = __webpack_require__(315);
7104
7105function _toConsumableArray(arr) {
7106  return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();
7107}
7108
7109module.exports = _toConsumableArray;
7110
7111/***/ }),
7112/* 141 */
7113/***/ (function(module, exports, __webpack_require__) {
7114
7115"use strict";
7116
7117
7118var _interopRequireDefault = __webpack_require__(1);
7119
7120var _defineProperty2 = _interopRequireDefault(__webpack_require__(31));
7121
7122Object.defineProperty(exports, "__esModule", {
7123  value: true
7124});
7125exports.isPluginType = isPluginType;
7126exports.clearPlugin = exports.renderPlugin = exports.createPluginInstance = exports.getPluginDestination = exports.getPluginDuration = exports.getPluginOrigin = exports.getPluginConfig = void 0;
7127
7128var _IX2LottieUtils = __webpack_require__(317);
7129
7130var _constants = __webpack_require__(6);
7131
7132var _IX2BrowserSupport = __webpack_require__(86); // eslint-disable-next-line webflow/module-top-level-imports, webflow/packages-must-be-defined
7133
7134
7135var pluginMethodMap = (0, _defineProperty2["default"])({}, _constants.ActionTypeConsts.PLUGIN_LOTTIE, {
7136  getConfig: _IX2LottieUtils.getPluginConfig,
7137  getOrigin: _IX2LottieUtils.getPluginOrigin,
7138  getDuration: _IX2LottieUtils.getPluginDuration,
7139  getDestination: _IX2LottieUtils.getPluginDestination,
7140  createInstance: _IX2LottieUtils.createPluginInstance,
7141  render: _IX2LottieUtils.renderPlugin,
7142  clear: _IX2LottieUtils.clearPlugin
7143});
7144
7145function isPluginType(actionTypeId) {
7146  return actionTypeId === _constants.ActionTypeConsts.PLUGIN_LOTTIE;
7147}
7148
7149var pluginMethod = function pluginMethod(methodName) {
7150  return function (actionTypeId) {
7151    if (!_IX2BrowserSupport.IS_BROWSER_ENV) {
7152      // IX2 plugins require browser libs for now
7153      return function () {
7154        return null;
7155      };
7156    }
7157
7158    var plugin = pluginMethodMap[actionTypeId];
7159
7160    if (!plugin) {
7161      throw new Error("IX2 no plugin configured for: ".concat(actionTypeId));
7162    }
7163
7164    var method = plugin[methodName];
7165
7166    if (!method) {
7167      throw new Error("IX2 invalid plugin method: ".concat(methodName));
7168    }
7169
7170    return method;
7171  };
7172};
7173
7174var getPluginConfig = pluginMethod('getConfig');
7175exports.getPluginConfig = getPluginConfig;
7176var getPluginOrigin = pluginMethod('getOrigin');
7177exports.getPluginOrigin = getPluginOrigin;
7178var getPluginDuration = pluginMethod('getDuration');
7179exports.getPluginDuration = getPluginDuration;
7180var getPluginDestination = pluginMethod('getDestination');
7181exports.getPluginDestination = getPluginDestination;
7182var createPluginInstance = pluginMethod('createInstance');
7183exports.createPluginInstance = createPluginInstance;
7184var renderPlugin = pluginMethod('render');
7185exports.renderPlugin = renderPlugin;
7186var clearPlugin = pluginMethod('clear');
7187exports.clearPlugin = clearPlugin;
7188
7189/***/ }),
7190/* 142 */
7191/***/ (function(module, exports, __webpack_require__) {
7192
7193var baseForOwn = __webpack_require__(143),
7194    createBaseEach = __webpack_require__(324);
7195
7196/**
7197 * The base implementation of `_.forEach` without support for iteratee shorthands.
7198 *
7199 * @private
7200 * @param {Array|Object} collection The collection to iterate over.
7201 * @param {Function} iteratee The function invoked per iteration.
7202 * @returns {Array|Object} Returns `collection`.
7203 */
7204var baseEach = createBaseEach(baseForOwn);
7205
7206module.exports = baseEach;
7207
7208
7209/***/ }),
7210/* 143 */
7211/***/ (function(module, exports, __webpack_require__) {
7212
7213var baseFor = __webpack_require__(322),
7214    keys = __webpack_require__(47);
7215
7216/**
7217 * The base implementation of `_.forOwn` without support for iteratee shorthands.
7218 *
7219 * @private
7220 * @param {Object} object The object to iterate over.
7221 * @param {Function} iteratee The function invoked per iteration.
7222 * @returns {Object} Returns `object`.
7223 */
7224function baseForOwn(object, iteratee) {
7225  return object && baseFor(object, iteratee, keys);
7226}
7227
7228module.exports = baseForOwn;
7229
7230
7231/***/ }),
7232/* 144 */
7233/***/ (function(module, exports, __webpack_require__) {
7234
7235"use strict";
7236
7237
7238var _interopRequireDefault = __webpack_require__(328);
7239
7240exports.__esModule = true;
7241exports.default = void 0;
7242
7243var _shallowEqual = _interopRequireDefault(__webpack_require__(329));
7244
7245var _default = _shallowEqual.default;
7246exports.default = _default;
7247
7248/***/ }),
7249/* 145 */
7250/***/ (function(module, exports, __webpack_require__) {
7251
7252"use strict";
7253
7254
7255var _interopRequireDefault2 = __webpack_require__(1);
7256
7257var _toConsumableArray2 = _interopRequireDefault2(__webpack_require__(140));
7258
7259var _interopRequireWildcard = __webpack_require__(39);
7260
7261var _interopRequireDefault = __webpack_require__(1);
7262
7263Object.defineProperty(exports, "__esModule", {
7264  value: true
7265});
7266exports.observeRequests = observeRequests;
7267exports.startEngine = startEngine;
7268exports.stopEngine = stopEngine;
7269exports.stopAllActionGroups = stopAllActionGroups;
7270exports.stopActionGroup = stopActionGroup;
7271exports.startActionGroup = startActionGroup;
7272
7273var _extends2 = _interopRequireDefault(__webpack_require__(30));
7274
7275var _objectWithoutPropertiesLoose2 = _interopRequireDefault(__webpack_require__(332));
7276
7277var _find = _interopRequireDefault(__webpack_require__(135));
7278
7279var _get = _interopRequireDefault(__webpack_require__(68));
7280
7281var _size = _interopRequireDefault(__webpack_require__(333));
7282
7283var _omitBy = _interopRequireDefault(__webpack_require__(339));
7284
7285var _isEmpty = _interopRequireDefault(__webpack_require__(351));
7286
7287var _mapValues = _interopRequireDefault(__webpack_require__(352));
7288
7289var _forEach = _interopRequireDefault(__webpack_require__(353));
7290
7291var _throttle = _interopRequireDefault(__webpack_require__(356));
7292
7293var _shallowEqual = _interopRequireDefault(__webpack_require__(144));
7294
7295var _constants = __webpack_require__(6);
7296
7297var _shared = __webpack_require__(29);
7298
7299var _IX2EngineActions = __webpack_require__(87);
7300
7301var elementApi = _interopRequireWildcard(__webpack_require__(359));
7302
7303var _IX2VanillaEvents = _interopRequireDefault(__webpack_require__(360));
7304/* eslint-env browser */
7305
7306
7307var QuickEffectsIdList = Object.keys(_constants.QuickEffectIds);
7308
7309var isQuickEffect = function isQuickEffect(actionTypeId) {
7310  return QuickEffectsIdList.includes(actionTypeId);
7311};
7312
7313var _constants$IX2EngineC = _constants.IX2EngineConstants,
7314    COLON_DELIMITER = _constants$IX2EngineC.COLON_DELIMITER,
7315    BOUNDARY_SELECTOR = _constants$IX2EngineC.BOUNDARY_SELECTOR,
7316    HTML_ELEMENT = _constants$IX2EngineC.HTML_ELEMENT,
7317    RENDER_GENERAL = _constants$IX2EngineC.RENDER_GENERAL,
7318    W_MOD_IX = _constants$IX2EngineC.W_MOD_IX;
7319var _shared$IX2VanillaUti = _shared.IX2VanillaUtils,
7320    getAffectedElements = _shared$IX2VanillaUti.getAffectedElements,
7321    getElementId = _shared$IX2VanillaUti.getElementId,
7322    getDestinationValues = _shared$IX2VanillaUti.getDestinationValues,
7323    observeStore = _shared$IX2VanillaUti.observeStore,
7324    getInstanceId = _shared$IX2VanillaUti.getInstanceId,
7325    renderHTMLElement = _shared$IX2VanillaUti.renderHTMLElement,
7326    clearAllStyles = _shared$IX2VanillaUti.clearAllStyles,
7327    getMaxDurationItemIndex = _shared$IX2VanillaUti.getMaxDurationItemIndex,
7328    getComputedStyle = _shared$IX2VanillaUti.getComputedStyle,
7329    getInstanceOrigin = _shared$IX2VanillaUti.getInstanceOrigin,
7330    reduceListToGroup = _shared$IX2VanillaUti.reduceListToGroup,
7331    shouldNamespaceEventParameter = _shared$IX2VanillaUti.shouldNamespaceEventParameter,
7332    getNamespacedParameterId = _shared$IX2VanillaUti.getNamespacedParameterId,
7333    shouldAllowMediaQuery = _shared$IX2VanillaUti.shouldAllowMediaQuery,
7334    cleanupHTMLElement = _shared$IX2VanillaUti.cleanupHTMLElement,
7335    stringifyTarget = _shared$IX2VanillaUti.stringifyTarget,
7336    mediaQueriesEqual = _shared$IX2VanillaUti.mediaQueriesEqual;
7337var _shared$IX2VanillaPlu = _shared.IX2VanillaPlugins,
7338    isPluginType = _shared$IX2VanillaPlu.isPluginType,
7339    createPluginInstance = _shared$IX2VanillaPlu.createPluginInstance,
7340    getPluginDuration = _shared$IX2VanillaPlu.getPluginDuration;
7341var ua = navigator.userAgent;
7342var IS_MOBILE_SAFARI = ua.match(/iPad/i) || ua.match(/iPhone/); // Keep throttled events at ~80fps to reduce reflows while maintaining render accuracy
7343
7344var THROTTLED_EVENT_WAIT = 12; // $FlowFixMe
7345
7346function observeRequests(store) {
7347  observeStore({
7348    store: store,
7349    select: function select(_ref) {
7350      var ixRequest = _ref.ixRequest;
7351      return ixRequest.preview;
7352    },
7353    onChange: handlePreviewRequest
7354  });
7355  observeStore({
7356    store: store,
7357    select: function select(_ref2) {
7358      var ixRequest = _ref2.ixRequest;
7359      return ixRequest.playback;
7360    },
7361    onChange: handlePlaybackRequest
7362  });
7363  observeStore({
7364    store: store,
7365    select: function select(_ref3) {
7366      var ixRequest = _ref3.ixRequest;
7367      return ixRequest.stop;
7368    },
7369    onChange: handleStopRequest
7370  });
7371  observeStore({
7372    store: store,
7373    select: function select(_ref4) {
7374      var ixRequest = _ref4.ixRequest;
7375      return ixRequest.clear;
7376    },
7377    onChange: handleClearRequest
7378  });
7379}
7380
7381function observeMediaQueryChange(store) {
7382  observeStore({
7383    store: store,
7384    select: function select(_ref5) {
7385      var ixSession = _ref5.ixSession;
7386      return ixSession.mediaQueryKey;
7387    },
7388    onChange: function onChange() {
7389      stopEngine(store);
7390      clearAllStyles({
7391        store: store,
7392        elementApi: elementApi
7393      });
7394      startEngine({
7395        store: store,
7396        allowEvents: true
7397      });
7398      dispatchPageUpdateEvent();
7399    }
7400  });
7401}
7402
7403function observeOneRenderTick(store, onTick) {
7404  var unsubscribe = observeStore({
7405    store: store,
7406    select: function select(_ref6) {
7407      var ixSession = _ref6.ixSession;
7408      return ixSession.tick;
7409    },
7410    onChange: function onChange(tick) {
7411      onTick(tick);
7412      unsubscribe();
7413    }
7414  });
7415}
7416
7417function handlePreviewRequest(_ref7, store) {
7418  var rawData = _ref7.rawData,
7419      defer = _ref7.defer;
7420
7421  var start = function start() {
7422    startEngine({
7423      store: store,
7424      rawData: rawData,
7425      allowEvents: true
7426    });
7427    dispatchPageUpdateEvent();
7428  };
7429
7430  defer ? setTimeout(start, 0) : start();
7431}
7432
7433function dispatchPageUpdateEvent() {
7434  document.dispatchEvent(new CustomEvent('IX2_PAGE_UPDATE'));
7435}
7436
7437function handlePlaybackRequest(playback, store) {
7438  var actionTypeId = playback.actionTypeId,
7439      actionListId = playback.actionListId,
7440      actionItemId = playback.actionItemId,
7441      eventId = playback.eventId,
7442      allowEvents = playback.allowEvents,
7443      immediate = playback.immediate,
7444      testManual = playback.testManual,
7445      _playback$verbose = playback.verbose,
7446      verbose = _playback$verbose === void 0 ? true : _playback$verbose;
7447  var rawData = playback.rawData;
7448
7449  if (actionListId && actionItemId && rawData && immediate) {
7450    var actionList = rawData.actionLists[actionListId];
7451
7452    if (actionList) {
7453      rawData = reduceListToGroup({
7454        actionList: actionList,
7455        actionItemId: actionItemId,
7456        rawData: rawData
7457      });
7458    }
7459  }
7460
7461  startEngine({
7462    store: store,
7463    rawData: rawData,
7464    allowEvents: allowEvents,
7465    testManual: testManual
7466  });
7467
7468  if (actionListId && actionTypeId === _constants.ActionTypeConsts.GENERAL_START_ACTION || isQuickEffect(actionTypeId)) {
7469    stopActionGroup({
7470      store: store,
7471      actionListId: actionListId
7472    });
7473    renderInitialGroup({
7474      store: store,
7475      actionListId: actionListId,
7476      eventId: eventId
7477    });
7478    var started = startActionGroup({
7479      store: store,
7480      eventId: eventId,
7481      actionListId: actionListId,
7482      immediate: immediate,
7483      verbose: verbose
7484    });
7485
7486    if (verbose && started) {
7487      store.dispatch((0, _IX2EngineActions.actionListPlaybackChanged)({
7488        actionListId: actionListId,
7489        isPlaying: !immediate
7490      }));
7491    }
7492  }
7493}
7494
7495function handleStopRequest(_ref8, store) {
7496  var actionListId = _ref8.actionListId;
7497
7498  if (actionListId) {
7499    stopActionGroup({
7500      store: store,
7501      actionListId: actionListId
7502    });
7503  } else {
7504    stopAllActionGroups({
7505      store: store
7506    });
7507  }
7508
7509  stopEngine(store);
7510}
7511
7512function handleClearRequest(state, store) {
7513  stopEngine(store);
7514  clearAllStyles({
7515    store: store,
7516    elementApi: elementApi
7517  });
7518} // $FlowFixMe
7519
7520
7521function startEngine(_ref9) {
7522  var store = _ref9.store,
7523      rawData = _ref9.rawData,
7524      allowEvents = _ref9.allowEvents,
7525      testManual = _ref9.testManual;
7526
7527  var _store$getState = store.getState(),
7528      ixSession = _store$getState.ixSession;
7529
7530  if (rawData) {
7531    store.dispatch((0, _IX2EngineActions.rawDataImported)(rawData));
7532  }
7533
7534  if (!ixSession.active) {
7535    store.dispatch((0, _IX2EngineActions.sessionInitialized)({
7536      hasBoundaryNodes: Boolean(document.querySelector(BOUNDARY_SELECTOR))
7537    }));
7538
7539    if (allowEvents) {
7540      bindEvents(store);
7541      addDocumentClass();
7542
7543      if (store.getState().ixSession.hasDefinedMediaQueries) {
7544        observeMediaQueryChange(store);
7545      }
7546    }
7547
7548    store.dispatch((0, _IX2EngineActions.sessionStarted)());
7549    startRenderLoop(store, testManual);
7550  }
7551}
7552
7553function addDocumentClass() {
7554  var _document = document,
7555      documentElement = _document.documentElement; // $FlowFixMe
7556
7557  if (documentElement.className.indexOf(W_MOD_IX) === -1) {
7558    // $FlowFixMe
7559    documentElement.className += " ".concat(W_MOD_IX);
7560  }
7561}
7562
7563function startRenderLoop(store, testManual) {
7564  var handleFrame = function handleFrame(now) {
7565    var _store$getState2 = store.getState(),
7566        ixSession = _store$getState2.ixSession,
7567        ixParameters = _store$getState2.ixParameters;
7568
7569    if (ixSession.active) {
7570      store.dispatch((0, _IX2EngineActions.animationFrameChanged)(now, ixParameters));
7571
7572      if (testManual) {
7573        observeOneRenderTick(store, handleFrame);
7574      } else {
7575        requestAnimationFrame(handleFrame);
7576      }
7577    }
7578  };
7579
7580  handleFrame(window.performance.now());
7581} // $FlowFixMe
7582
7583
7584function stopEngine(store) {
7585  var _store$getState3 = store.getState(),
7586      ixSession = _store$getState3.ixSession;
7587
7588  if (ixSession.active) {
7589    var eventListeners = ixSession.eventListeners;
7590    eventListeners.forEach(clearEventListener);
7591    store.dispatch((0, _IX2EngineActions.sessionStopped)());
7592  }
7593}
7594
7595function clearEventListener(_ref10) {
7596  var target = _ref10.target,
7597      listenerParams = _ref10.listenerParams;
7598  target.removeEventListener.apply(target, listenerParams);
7599}
7600
7601function createGroupInstances(_ref11) {
7602  var store = _ref11.store,
7603      eventStateKey = _ref11.eventStateKey,
7604      eventTarget = _ref11.eventTarget,
7605      eventId = _ref11.eventId,
7606      eventConfig = _ref11.eventConfig,
7607      actionListId = _ref11.actionListId,
7608      parameterGroup = _ref11.parameterGroup,
7609      smoothing = _ref11.smoothing,
7610      restingValue = _ref11.restingValue;
7611
7612  var _store$getState4 = store.getState(),
7613      ixData = _store$getState4.ixData,
7614      ixSession = _store$getState4.ixSession;
7615
7616  var events = ixData.events;
7617  var event = events[eventId];
7618  var eventTypeId = event.eventTypeId;
7619  var targetCache = {};
7620  var instanceActionGroups = {};
7621  var instanceConfigs = [];
7622  var continuousActionGroups = parameterGroup.continuousActionGroups;
7623  var parameterId = parameterGroup.id;
7624
7625  if (shouldNamespaceEventParameter(eventTypeId, eventConfig)) {
7626    parameterId = getNamespacedParameterId(eventStateKey, parameterId);
7627  } // Limit affected elements when event target is within a boundary node
7628
7629
7630  var eventElementRoot = ixSession.hasBoundaryNodes && eventTarget ? elementApi.getClosestElement(eventTarget, BOUNDARY_SELECTOR) : null;
7631  continuousActionGroups.forEach(function (actionGroup) {
7632    var keyframe = actionGroup.keyframe,
7633        actionItems = actionGroup.actionItems;
7634    actionItems.forEach(function (actionItem) {
7635      var actionTypeId = actionItem.actionTypeId;
7636      var target = actionItem.config.target;
7637
7638      if (!target) {
7639        return;
7640      }
7641
7642      var elementRoot = target.boundaryMode ? eventElementRoot : null;
7643      var key = stringifyTarget(target) + COLON_DELIMITER + actionTypeId;
7644      instanceActionGroups[key] = appendActionItem(instanceActionGroups[key], keyframe, actionItem);
7645
7646      if (!targetCache[key]) {
7647        targetCache[key] = true;
7648        var config = actionItem.config;
7649        getAffectedElements({
7650          config: config,
7651          event: event,
7652          eventTarget: eventTarget,
7653          elementRoot: elementRoot,
7654          elementApi: elementApi
7655        }).forEach(function (element) {
7656          instanceConfigs.push({
7657            element: element,
7658            key: key
7659          });
7660        });
7661      }
7662    });
7663  });
7664  instanceConfigs.forEach(function (_ref12) {
7665    var element = _ref12.element,
7666        key = _ref12.key;
7667    var actionGroups = instanceActionGroups[key];
7668    var actionItem = (0, _get["default"])(actionGroups, "[0].actionItems[0]", {});
7669    var actionTypeId = actionItem.actionTypeId;
7670    var pluginInstance = isPluginType(actionTypeId) ? // $FlowFixMe
7671    createPluginInstance(actionTypeId)(element, actionItem) : null;
7672    var destination = getDestinationValues({
7673      element: element,
7674      actionItem: actionItem,
7675      elementApi: elementApi
7676    }, // $FlowFixMe
7677    pluginInstance);
7678    createInstance({
7679      store: store,
7680      element: element,
7681      eventId: eventId,
7682      actionListId: actionListId,
7683      actionItem: actionItem,
7684      destination: destination,
7685      continuous: true,
7686      parameterId: parameterId,
7687      actionGroups: actionGroups,
7688      smoothing: smoothing,
7689      restingValue: restingValue,
7690      pluginInstance: pluginInstance
7691    });
7692  });
7693}
7694
7695function appendActionItem() {
7696  var actionGroups = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
7697  var keyframe = arguments.length > 1 ? arguments[1] : undefined;
7698  var actionItem = arguments.length > 2 ? arguments[2] : undefined;
7699  var newActionGroups = (0, _toConsumableArray2["default"])(actionGroups);
7700  var groupIndex;
7701  newActionGroups.some(function (group, index) {
7702    if (group.keyframe === keyframe) {
7703      groupIndex = index;
7704      return true;
7705    }
7706
7707    return false;
7708  });
7709
7710  if (groupIndex == null) {
7711    groupIndex = newActionGroups.length;
7712    newActionGroups.push({
7713      keyframe: keyframe,
7714      actionItems: []
7715    });
7716  }
7717
7718  newActionGroups[groupIndex].actionItems.push(actionItem);
7719  return newActionGroups;
7720}
7721
7722function bindEvents(store) {
7723  var _store$getState5 = store.getState(),
7724      ixData = _store$getState5.ixData;
7725
7726  var eventTypeMap = ixData.eventTypeMap;
7727  updateViewportWidth(store);
7728  (0, _forEach["default"])(eventTypeMap, function (events, key) {
7729    var logic = _IX2VanillaEvents["default"][key];
7730
7731    if (!logic) {
7732      console.warn("IX2 event type not configured: ".concat(key));
7733      return;
7734    }
7735
7736    bindEventType({
7737      logic: logic,
7738      store: store,
7739      events: events
7740    });
7741  });
7742
7743  var _store$getState6 = store.getState(),
7744      ixSession = _store$getState6.ixSession;
7745
7746  if (ixSession.eventListeners.length) {
7747    bindResizeEvents(store);
7748  }
7749}
7750
7751var WINDOW_RESIZE_EVENTS = ['resize', 'orientationchange'];
7752
7753function bindResizeEvents(store) {
7754  var handleResize = function handleResize() {
7755    updateViewportWidth(store);
7756  };
7757
7758  WINDOW_RESIZE_EVENTS.forEach(function (type) {
7759    window.addEventListener(type, handleResize);
7760    store.dispatch((0, _IX2EngineActions.eventListenerAdded)(window, [type, handleResize]));
7761  });
7762  handleResize();
7763}
7764
7765function updateViewportWidth(store) {
7766  var _store$getState7 = store.getState(),
7767      ixSession = _store$getState7.ixSession,
7768      ixData = _store$getState7.ixData;
7769
7770  var width = window.innerWidth;
7771
7772  if (width !== ixSession.viewportWidth) {
7773    var mediaQueries = ixData.mediaQueries;
7774    store.dispatch((0, _IX2EngineActions.viewportWidthChanged)({
7775      width: width,
7776      mediaQueries: mediaQueries
7777    }));
7778  }
7779}
7780
7781var mapFoundValues = function mapFoundValues(object, iteratee) {
7782  return (0, _omitBy["default"])((0, _mapValues["default"])(object, iteratee), _isEmpty["default"]);
7783};
7784
7785var forEachEventTarget = function forEachEventTarget(eventTargets, eventCallback) {
7786  (0, _forEach["default"])(eventTargets, function (elements, eventId) {
7787    elements.forEach(function (element, index) {
7788      var eventStateKey = eventId + COLON_DELIMITER + index;
7789      eventCallback(element, eventId, eventStateKey);
7790    });
7791  });
7792};
7793
7794var getAffectedForEvent = function getAffectedForEvent(event) {
7795  var config = {
7796    target: event.target,
7797    targets: event.targets
7798  };
7799  return getAffectedElements({
7800    config: config,
7801    elementApi: elementApi
7802  });
7803};
7804
7805function bindEventType(_ref13) {
7806  var logic = _ref13.logic,
7807      store = _ref13.store,
7808      events = _ref13.events;
7809  injectBehaviorCSSFixes(events);
7810  var eventTypes = logic.types,
7811      eventHandler = logic.handler;
7812
7813  var _store$getState8 = store.getState(),
7814      ixData = _store$getState8.ixData;
7815
7816  var actionLists = ixData.actionLists;
7817  var eventTargets = mapFoundValues(events, getAffectedForEvent);
7818
7819  if (!(0, _size["default"])(eventTargets)) {
7820    return;
7821  }
7822
7823  (0, _forEach["default"])(eventTargets, function (elements, key) {
7824    var event = events[key];
7825    var eventAction = event.action,
7826        eventId = event.id,
7827        _event$mediaQueries = event.mediaQueries,
7828        mediaQueries = _event$mediaQueries === void 0 ? ixData.mediaQueryKeys : _event$mediaQueries;
7829    var actionListId = eventAction.config.actionListId;
7830
7831    if (!mediaQueriesEqual(mediaQueries, ixData.mediaQueryKeys)) {
7832      store.dispatch((0, _IX2EngineActions.mediaQueriesDefined)());
7833    }
7834
7835    if (eventAction.actionTypeId === _constants.ActionTypeConsts.GENERAL_CONTINUOUS_ACTION) {
7836      var configs = Array.isArray(event.config) ? event.config : [event.config];
7837      configs.forEach(function (eventConfig) {
7838        var continuousParameterGroupId = eventConfig.continuousParameterGroupId;
7839        var paramGroups = (0, _get["default"])(actionLists, "".concat(actionListId, ".continuousParameterGroups"), []);
7840        var parameterGroup = (0, _find["default"])(paramGroups, function (_ref14) {
7841          var id = _ref14.id;
7842          return id === continuousParameterGroupId;
7843        });
7844        var smoothing = (eventConfig.smoothing || 0) / 100;
7845        var restingValue = (eventConfig.restingState || 0) / 100;
7846
7847        if (!parameterGroup) {
7848          return;
7849        }
7850
7851        elements.forEach(function (eventTarget, index) {
7852          var eventStateKey = eventId + COLON_DELIMITER + index;
7853          createGroupInstances({
7854            store: store,
7855            eventStateKey: eventStateKey,
7856            eventTarget: eventTarget,
7857            eventId: eventId,
7858            eventConfig: eventConfig,
7859            actionListId: actionListId,
7860            parameterGroup: parameterGroup,
7861            smoothing: smoothing,
7862            restingValue: restingValue
7863          });
7864        });
7865      });
7866    }
7867
7868    if (eventAction.actionTypeId === _constants.ActionTypeConsts.GENERAL_START_ACTION || isQuickEffect(eventAction.actionTypeId)) {
7869      renderInitialGroup({
7870        store: store,
7871        actionListId: actionListId,
7872        eventId: eventId
7873      });
7874    }
7875  });
7876
7877  var handleEvent = function handleEvent(nativeEvent) {
7878    var _store$getState9 = store.getState(),
7879        ixSession = _store$getState9.ixSession;
7880
7881    forEachEventTarget(eventTargets, function (element, eventId, eventStateKey) {
7882      var event = events[eventId];
7883      var oldState = ixSession.eventState[eventStateKey];
7884      var eventAction = event.action,
7885          _event$mediaQueries2 = event.mediaQueries,
7886          mediaQueries = _event$mediaQueries2 === void 0 ? ixData.mediaQueryKeys : _event$mediaQueries2; // Bypass event handler if current media query is not listed in event config
7887
7888      if (!shouldAllowMediaQuery(mediaQueries, ixSession.mediaQueryKey)) {
7889        return;
7890      }
7891
7892      var handleEventWithConfig = function handleEventWithConfig() {
7893        var eventConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7894        var newState = eventHandler({
7895          store: store,
7896          element: element,
7897          event: event,
7898          eventConfig: eventConfig,
7899          nativeEvent: nativeEvent,
7900          eventStateKey: eventStateKey
7901        }, oldState);
7902
7903        if (!(0, _shallowEqual["default"])(newState, oldState)) {
7904          store.dispatch((0, _IX2EngineActions.eventStateChanged)(eventStateKey, newState));
7905        }
7906      };
7907
7908      if (eventAction.actionTypeId === _constants.ActionTypeConsts.GENERAL_CONTINUOUS_ACTION) {
7909        var configs = Array.isArray(event.config) ? event.config : [event.config];
7910        configs.forEach(handleEventWithConfig);
7911      } else {
7912        handleEventWithConfig();
7913      }
7914    });
7915  };
7916
7917  var handleEventThrottled = (0, _throttle["default"])(handleEvent, THROTTLED_EVENT_WAIT);
7918
7919  var addListeners = function addListeners(_ref15) {
7920    var _ref15$target = _ref15.target,
7921        target = _ref15$target === void 0 ? document : _ref15$target,
7922        types = _ref15.types,
7923        shouldThrottle = _ref15.throttle;
7924    types.split(' ').filter(Boolean).forEach(function (type) {
7925      var handlerFunc = shouldThrottle ? handleEventThrottled : handleEvent; // $FlowFixMe
7926
7927      target.addEventListener(type, handlerFunc);
7928      store.dispatch((0, _IX2EngineActions.eventListenerAdded)(target, [type, handlerFunc]));
7929    });
7930  };
7931
7932  if (Array.isArray(eventTypes)) {
7933    eventTypes.forEach(addListeners);
7934  } else if (typeof eventTypes === 'string') {
7935    addListeners(logic);
7936  }
7937}
7938/**
7939 * Injects CSS into the document to fix behavior issues across
7940 * different devices.
7941 */
7942
7943
7944function injectBehaviorCSSFixes(events) {
7945  if (!IS_MOBILE_SAFARI) {
7946    return;
7947  }
7948
7949  var injectedSelectors = {};
7950  var cssText = '';
7951
7952  for (var eventId in events) {
7953    var _events$eventId = events[eventId],
7954        eventTypeId = _events$eventId.eventTypeId,
7955        target = _events$eventId.target;
7956    var selector = elementApi.getQuerySelector(target); // $FlowFixMe
7957
7958    if (injectedSelectors[selector]) {
7959      continue;
7960    } // add a "cursor: pointer" style rule to ensure that CLICK events get fired for IOS devices
7961
7962
7963    if (eventTypeId === _constants.EventTypeConsts.MOUSE_CLICK || eventTypeId === _constants.EventTypeConsts.MOUSE_SECOND_CLICK) {
7964      // $FlowFixMe
7965      injectedSelectors[selector] = true;
7966      cssText += // $FlowFixMe
7967      selector + '{' + 'cursor: pointer;' + 'touch-action: manipulation;' + '}';
7968    }
7969  }
7970
7971  if (cssText) {
7972    var style = document.createElement('style');
7973    style.textContent = cssText; // $FlowFixMe
7974
7975    document.body.appendChild(style);
7976  }
7977}
7978
7979function renderInitialGroup(_ref16) {
7980  var store = _ref16.store,
7981      actionListId = _ref16.actionListId,
7982      eventId = _ref16.eventId;
7983
7984  var _store$getState10 = store.getState(),
7985      ixData = _store$getState10.ixData,
7986      ixSession = _store$getState10.ixSession;
7987
7988  var actionLists = ixData.actionLists,
7989      events = ixData.events;
7990  var event = events[eventId];
7991  var actionList = actionLists[actionListId];
7992
7993  if (actionList && actionList.useFirstGroupAsInitialState) {
7994    var initialStateItems = (0, _get["default"])(actionList, 'actionItemGroups[0].actionItems', []); // Bypass initial state render if current media query is not listed in event config
7995
7996    var mediaQueries = (0, _get["default"])(event, 'mediaQueries', ixData.mediaQueryKeys);
7997
7998    if (!shouldAllowMediaQuery(mediaQueries, ixSession.mediaQueryKey)) {
7999      return;
8000    }
8001
8002    initialStateItems.forEach(function (actionItem) {
8003      var _itemConfig$target;
8004
8005      var itemConfig = actionItem.config,
8006          actionTypeId = actionItem.actionTypeId;
8007      var config = // When useEventTarget is explicitly true, use event target/targets to query elements
8008      (itemConfig === null || itemConfig === void 0 ? void 0 : (_itemConfig$target = itemConfig.target) === null || _itemConfig$target === void 0 ? void 0 : _itemConfig$target.useEventTarget) === true ? {
8009        target: event.target,
8010        targets: event.targets
8011      } : itemConfig;
8012      var itemElements = getAffectedElements({
8013        config: config,
8014        event: event,
8015        elementApi: elementApi
8016      });
8017      var shouldUsePlugin = isPluginType(actionTypeId);
8018      itemElements.forEach(function (element) {
8019        var pluginInstance = shouldUsePlugin ? // $FlowFixMe
8020        createPluginInstance(actionTypeId)(element, actionItem) : null;
8021        createInstance({
8022          destination: getDestinationValues({
8023            element: element,
8024            actionItem: actionItem,
8025            elementApi: elementApi
8026          }, // $FlowFixMe
8027          pluginInstance),
8028          immediate: true,
8029          store: store,
8030          element: element,
8031          eventId: eventId,
8032          actionItem: actionItem,
8033          actionListId: actionListId,
8034          pluginInstance: pluginInstance
8035        });
8036      });
8037    });
8038  }
8039} // $FlowFixMe
8040
8041
8042function stopAllActionGroups(_ref17) {
8043  var store = _ref17.store;
8044
8045  var _store$getState11 = store.getState(),
8046      ixInstances = _store$getState11.ixInstances;
8047
8048  (0, _forEach["default"])(ixInstances, function (instance) {
8049    if (!instance.continuous) {
8050      var actionListId = instance.actionListId,
8051          verbose = instance.verbose;
8052      removeInstance(instance, store);
8053
8054      if (verbose) {
8055        store.dispatch((0, _IX2EngineActions.actionListPlaybackChanged)({
8056          actionListId: actionListId,
8057          isPlaying: false
8058        }));
8059      }
8060    }
8061  });
8062} // $FlowFixMe
8063
8064
8065function stopActionGroup(_ref18) {
8066  var store = _ref18.store,
8067      eventId = _ref18.eventId,
8068      eventTarget = _ref18.eventTarget,
8069      eventStateKey = _ref18.eventStateKey,
8070      actionListId = _ref18.actionListId;
8071
8072  var _store$getState12 = store.getState(),
8073      ixInstances = _store$getState12.ixInstances,
8074      ixSession = _store$getState12.ixSession; // Check for element boundary before stopping engine instances
8075
8076
8077  var eventElementRoot = ixSession.hasBoundaryNodes && eventTarget ? elementApi.getClosestElement(eventTarget, BOUNDARY_SELECTOR) : null;
8078  (0, _forEach["default"])(ixInstances, function (instance) {
8079    var boundaryMode = (0, _get["default"])(instance, 'actionItem.config.target.boundaryMode'); // Validate event key if eventStateKey was provided, otherwise default to true
8080
8081    var validEventKey = eventStateKey ? instance.eventStateKey === eventStateKey : true; // Remove engine instances that match the required ids
8082
8083    if (instance.actionListId === actionListId && instance.eventId === eventId && validEventKey) {
8084      // Avoid removal when root boundary does not contain instance element
8085      if (eventElementRoot && boundaryMode && !elementApi.elementContains(eventElementRoot, instance.element)) {
8086        return;
8087      }
8088
8089      removeInstance(instance, store);
8090
8091      if (instance.verbose) {
8092        store.dispatch((0, _IX2EngineActions.actionListPlaybackChanged)({
8093          actionListId: actionListId,
8094          isPlaying: false
8095        }));
8096      }
8097    }
8098  });
8099} // $FlowFixMe
8100
8101
8102function startActionGroup(_ref19) {
8103  var store = _ref19.store,
8104      eventId = _ref19.eventId,
8105      eventTarget = _ref19.eventTarget,
8106      eventStateKey = _ref19.eventStateKey,
8107      actionListId = _ref19.actionListId,
8108      _ref19$groupIndex = _ref19.groupIndex,
8109      groupIndex = _ref19$groupIndex === void 0 ? 0 : _ref19$groupIndex,
8110      immediate = _ref19.immediate,
8111      verbose = _ref19.verbose;
8112
8113  var _event$action;
8114
8115  var _store$getState13 = store.getState(),
8116      ixData = _store$getState13.ixData,
8117      ixSession = _store$getState13.ixSession;
8118
8119  var events = ixData.events;
8120  var event = events[eventId] || {};
8121  var _event$mediaQueries3 = event.mediaQueries,
8122      mediaQueries = _event$mediaQueries3 === void 0 ? ixData.mediaQueryKeys : _event$mediaQueries3;
8123  var actionList = (0, _get["default"])(ixData, "actionLists.".concat(actionListId), {});
8124  var actionItemGroups = actionList.actionItemGroups,
8125      useFirstGroupAsInitialState = actionList.useFirstGroupAsInitialState; // Abort playback if no action groups
8126
8127  if (!actionItemGroups || !actionItemGroups.length) {
8128    return false;
8129  } // Reset to first group when event loop is configured
8130
8131
8132  if (groupIndex >= actionItemGroups.length && (0, _get["default"])(event, 'config.loop')) {
8133    groupIndex = 0;
8134  } // Skip initial state group during action list playback, as it should already be applied
8135
8136
8137  if (groupIndex === 0 && useFirstGroupAsInitialState) {
8138    groupIndex++;
8139  } // Identify first animated group and apply the initial QuickEffect delay
8140
8141
8142  var isFirstGroup = groupIndex === 0 || groupIndex === 1 && useFirstGroupAsInitialState;
8143  var instanceDelay = isFirstGroup && isQuickEffect((_event$action = event.action) === null || _event$action === void 0 ? void 0 : _event$action.actionTypeId) ? event.config.delay : undefined; // Abort playback if no action items exist at group index
8144
8145  var actionItems = (0, _get["default"])(actionItemGroups, [groupIndex, 'actionItems'], []);
8146
8147  if (!actionItems.length) {
8148    return false;
8149  } // Abort playback if current media query is not listed in event config
8150
8151
8152  if (!shouldAllowMediaQuery(mediaQueries, ixSession.mediaQueryKey)) {
8153    return false;
8154  } // Limit affected elements when event target is within a boundary node
8155
8156
8157  var eventElementRoot = ixSession.hasBoundaryNodes && eventTarget ? elementApi.getClosestElement(eventTarget, BOUNDARY_SELECTOR) : null;
8158  var carrierIndex = getMaxDurationItemIndex(actionItems);
8159  var groupStartResult = false;
8160  actionItems.forEach(function (actionItem, actionIndex) {
8161    var config = actionItem.config,
8162        actionTypeId = actionItem.actionTypeId;
8163    var shouldUsePlugin = isPluginType(actionTypeId);
8164    var target = config.target;
8165
8166    if (!target) {
8167      return;
8168    }
8169
8170    var elementRoot = target.boundaryMode ? eventElementRoot : null;
8171    var elements = getAffectedElements({
8172      config: config,
8173      event: event,
8174      eventTarget: eventTarget,
8175      elementRoot: elementRoot,
8176      elementApi: elementApi
8177    });
8178    elements.forEach(function (element, elementIndex) {
8179      var pluginInstance = shouldUsePlugin ? // $FlowFixMe
8180      createPluginInstance(actionTypeId)(element, actionItem) : null;
8181      var pluginDuration = shouldUsePlugin ? // $FlowFixMe
8182      getPluginDuration(actionTypeId)(element, actionItem) : null;
8183      groupStartResult = true;
8184      var isCarrier = carrierIndex === actionIndex && elementIndex === 0;
8185      var computedStyle = getComputedStyle({
8186        element: element,
8187        actionItem: actionItem
8188      });
8189      var destination = getDestinationValues({
8190        element: element,
8191        actionItem: actionItem,
8192        elementApi: elementApi
8193      }, // $FlowFixMe
8194      pluginInstance);
8195      createInstance({
8196        store: store,
8197        element: element,
8198        actionItem: actionItem,
8199        eventId: eventId,
8200        eventTarget: eventTarget,
8201        eventStateKey: eventStateKey,
8202        actionListId: actionListId,
8203        groupIndex: groupIndex,
8204        isCarrier: isCarrier,
8205        computedStyle: computedStyle,
8206        destination: destination,
8207        immediate: immediate,
8208        verbose: verbose,
8209        pluginInstance: pluginInstance,
8210        pluginDuration: pluginDuration,
8211        instanceDelay: instanceDelay
8212      });
8213    });
8214  });
8215  return groupStartResult;
8216}
8217
8218function createInstance(options) {
8219  // $FlowFixMe
8220  var store = options.store,
8221      computedStyle = options.computedStyle,
8222      rest = (0, _objectWithoutPropertiesLoose2["default"])(options, ["store", "computedStyle"]); // $FlowFixMe
8223
8224  var autoStart = !rest.continuous; // $FlowFixMe
8225
8226  var element = rest.element,
8227      actionItem = rest.actionItem,
8228      immediate = rest.immediate,
8229      pluginInstance = rest.pluginInstance;
8230  var instanceId = getInstanceId();
8231
8232  var _store$getState14 = store.getState(),
8233      ixElements = _store$getState14.ixElements,
8234      ixSession = _store$getState14.ixSession;
8235
8236  var elementId = getElementId(ixElements, element);
8237
8238  var _ref20 = ixElements[elementId] || {},
8239      refState = _ref20.refState;
8240
8241  var refType = elementApi.getRefType(element);
8242  var origin = getInstanceOrigin(element, refState, computedStyle, actionItem, elementApi, // $FlowFixMe
8243  pluginInstance);
8244  store.dispatch((0, _IX2EngineActions.instanceAdded)((0, _extends2["default"])({
8245    instanceId: instanceId,
8246    elementId: elementId,
8247    origin: origin,
8248    refType: refType
8249  }, rest)));
8250  dispatchCustomEvent(document.body, 'ix2-animation-started', instanceId);
8251
8252  if (immediate) {
8253    renderImmediateInstance(store, instanceId);
8254    return;
8255  }
8256
8257  observeStore({
8258    store: store,
8259    select: function select(_ref21) {
8260      var ixInstances = _ref21.ixInstances;
8261      return ixInstances[instanceId];
8262    },
8263    onChange: handleInstanceChange
8264  });
8265
8266  if (autoStart) {
8267    store.dispatch((0, _IX2EngineActions.instanceStarted)(instanceId, ixSession.tick));
8268  }
8269}
8270
8271function removeInstance(instance, store) {
8272  dispatchCustomEvent(document.body, 'ix2-animation-stopping', {
8273    instanceId: instance.id,
8274    state: store.getState()
8275  });
8276  var elementId = instance.elementId,
8277      actionItem = instance.actionItem;
8278
8279  var _store$getState15 = store.getState(),
8280      ixElements = _store$getState15.ixElements;
8281
8282  var _ref22 = ixElements[elementId] || {},
8283      ref = _ref22.ref,
8284      refType = _ref22.refType;
8285
8286  if (refType === HTML_ELEMENT) {
8287    cleanupHTMLElement(ref, actionItem, elementApi);
8288  }
8289
8290  store.dispatch((0, _IX2EngineActions.instanceRemoved)(instance.id));
8291}
8292
8293function dispatchCustomEvent(element, eventName, detail) {
8294  var event = document.createEvent('CustomEvent');
8295  event.initCustomEvent(eventName, true, true, detail); // $FlowFixMe
8296
8297  element.dispatchEvent(event);
8298}
8299
8300function renderImmediateInstance(store, instanceId) {
8301  var _store$getState16 = store.getState(),
8302      ixParameters = _store$getState16.ixParameters;
8303
8304  store.dispatch((0, _IX2EngineActions.instanceStarted)(instanceId, 0));
8305  store.dispatch((0, _IX2EngineActions.animationFrameChanged)(performance.now(), ixParameters));
8306
8307  var _store$getState17 = store.getState(),
8308      ixInstances = _store$getState17.ixInstances;
8309
8310  handleInstanceChange(ixInstances[instanceId], store);
8311}
8312
8313function handleInstanceChange(instance, store) {
8314  var active = instance.active,
8315      continuous = instance.continuous,
8316      complete = instance.complete,
8317      elementId = instance.elementId,
8318      actionItem = instance.actionItem,
8319      actionTypeId = instance.actionTypeId,
8320      renderType = instance.renderType,
8321      current = instance.current,
8322      groupIndex = instance.groupIndex,
8323      eventId = instance.eventId,
8324      eventTarget = instance.eventTarget,
8325      eventStateKey = instance.eventStateKey,
8326      actionListId = instance.actionListId,
8327      isCarrier = instance.isCarrier,
8328      styleProp = instance.styleProp,
8329      verbose = instance.verbose,
8330      pluginInstance = instance.pluginInstance; // Bypass render if current media query is not listed in event config
8331
8332  var _store$getState18 = store.getState(),
8333      ixData = _store$getState18.ixData,
8334      ixSession = _store$getState18.ixSession;
8335
8336  var events = ixData.events;
8337  var event = events[eventId] || {};
8338  var _event$mediaQueries4 = event.mediaQueries,
8339      mediaQueries = _event$mediaQueries4 === void 0 ? ixData.mediaQueryKeys : _event$mediaQueries4;
8340
8341  if (!shouldAllowMediaQuery(mediaQueries, ixSession.mediaQueryKey)) {
8342    return;
8343  }
8344
8345  if (continuous || active || complete) {
8346    if (current || renderType === RENDER_GENERAL && complete) {
8347      // Render current values to ref state and grab latest
8348      store.dispatch((0, _IX2EngineActions.elementStateChanged)(elementId, actionTypeId, current, actionItem));
8349
8350      var _store$getState19 = store.getState(),
8351          ixElements = _store$getState19.ixElements;
8352
8353      var _ref23 = ixElements[elementId] || {},
8354          ref = _ref23.ref,
8355          refType = _ref23.refType,
8356          refState = _ref23.refState;
8357
8358      var actionState = refState && refState[actionTypeId]; // Choose render based on ref type
8359
8360      switch (refType) {
8361        case HTML_ELEMENT:
8362          {
8363            renderHTMLElement(ref, refState, actionState, eventId, actionItem, styleProp, elementApi, renderType, pluginInstance);
8364            break;
8365          }
8366      }
8367    }
8368
8369    if (complete) {
8370      if (isCarrier) {
8371        var started = startActionGroup({
8372          store: store,
8373          eventId: eventId,
8374          eventTarget: eventTarget,
8375          eventStateKey: eventStateKey,
8376          actionListId: actionListId,
8377          groupIndex: groupIndex + 1,
8378          verbose: verbose
8379        });
8380
8381        if (verbose && !started) {
8382          store.dispatch((0, _IX2EngineActions.actionListPlaybackChanged)({
8383            actionListId: actionListId,
8384            isPlaying: false
8385          }));
8386        }
8387      }
8388
8389      removeInstance(instance, store);
8390    }
8391  }
8392}
8393
8394/***/ }),
8395/* 146 */
8396/***/ (function(module, exports, __webpack_require__) {
8397
8398var defineProperty = __webpack_require__(147);
8399
8400/**
8401 * The base implementation of `assignValue` and `assignMergeValue` without
8402 * value checks.
8403 *
8404 * @private
8405 * @param {Object} object The object to modify.
8406 * @param {string} key The key of the property to assign.
8407 * @param {*} value The value to assign.
8408 */
8409function baseAssignValue(object, key, value) {
8410  if (key == '__proto__' && defineProperty) {
8411    defineProperty(object, key, {
8412      'configurable': true,
8413      'enumerable': true,
8414      'value': value,
8415      'writable': true
8416    });
8417  } else {
8418    object[key] = value;
8419  }
8420}
8421
8422module.exports = baseAssignValue;
8423
8424
8425/***/ }),
8426/* 147 */
8427/***/ (function(module, exports, __webpack_require__) {
8428
8429var getNative = __webpack_require__(19);
8430
8431var defineProperty = (function() {
8432  try {
8433    var func = getNative(Object, 'defineProperty');
8434    func({}, '', {});
8435    return func;
8436  } catch (e) {}
8437}());
8438
8439module.exports = defineProperty;
8440
8441
8442/***/ }),
8443/* 148 */
8444/***/ (function(module, exports, __webpack_require__) {
8445
8446var isObject = __webpack_require__(12);
8447
8448/** Built-in value references. */
8449var objectCreate = Object.create;
8450
8451/**
8452 * The base implementation of `_.create` without support for assigning
8453 * properties to the created object.
8454 *
8455 * @private
8456 * @param {Object} proto The object to inherit from.
8457 * @returns {Object} Returns the new object.
8458 */
8459var baseCreate = (function() {
8460  function object() {}
8461  return function(proto) {
8462    if (!isObject(proto)) {
8463      return {};
8464    }
8465    if (objectCreate) {
8466      return objectCreate(proto);
8467    }
8468    object.prototype = proto;
8469    var result = new object;
8470    object.prototype = undefined;
8471    return result;
8472  };
8473}());
8474
8475module.exports = baseCreate;
8476
8477
8478/***/ }),
8479/* 149 */
8480/***/ (function(module, exports, __webpack_require__) {
8481
8482var metaMap = __webpack_require__(373),
8483    noop = __webpack_require__(374);
8484
8485/**
8486 * Gets metadata for `func`.
8487 *
8488 * @private
8489 * @param {Function} func The function to query.
8490 * @returns {*} Returns the metadata for `func`.
8491 */
8492var getData = !metaMap ? noop : function(func) {
8493  return metaMap.get(func);
8494};
8495
8496module.exports = getData;
8497
8498
8499/***/ }),
8500/* 150 */
8501/***/ (function(module, exports, __webpack_require__) {
8502
8503var realNames = __webpack_require__(375);
8504
8505/** Used for built-in method references. */
8506var objectProto = Object.prototype;
8507
8508/** Used to check objects for own properties. */
8509var hasOwnProperty = objectProto.hasOwnProperty;
8510
8511/**
8512 * Gets the name of `func`.
8513 *
8514 * @private
8515 * @param {Function} func The function to query.
8516 * @returns {string} Returns the function name.
8517 */
8518function getFuncName(func) {
8519  var result = (func.name + ''),
8520      array = realNames[result],
8521      length = hasOwnProperty.call(realNames, result) ? array.length : 0;
8522
8523  while (length--) {
8524    var data = array[length],
8525        otherFunc = data.func;
8526    if (otherFunc == null || otherFunc == func) {
8527      return data.name;
8528    }
8529  }
8530  return result;
8531}
8532
8533module.exports = getFuncName;
8534
8535
8536/***/ }),
8537/* 151 */
8538/***/ (function(module, exports, __webpack_require__) {
8539
8540__webpack_require__(152);
8541__webpack_require__(286);
8542__webpack_require__(56);
8543__webpack_require__(288);
8544__webpack_require__(382);
8545__webpack_require__(383);
8546__webpack_require__(384);
8547__webpack_require__(385);
8548__webpack_require__(386);
8549__webpack_require__(391);
8550module.exports = __webpack_require__(392);
8551
8552
8553/***/ }),
8554/* 152 */
8555/***/ (function(module, exports, __webpack_require__) {
8556
8557"use strict";
8558 // @wf-will-never-add-flow-to-this-file
8559
8560/* eslint-disable no-var */
8561
8562var Webflow = __webpack_require__(9);
8563
8564var lottieSiteModule = __webpack_require__(154);
8565
8566var lottie = __webpack_require__(285);
8567
8568Webflow.define('lottie', module.exports = function () {
8569  return {
8570    lottie: lottie,
8571    createInstance: lottieSiteModule.createInstance,
8572    cleanupElement: lottieSiteModule.cleanupElement,
8573    init: lottieSiteModule.init,
8574    destroy: lottieSiteModule.destroy,
8575    ready: lottieSiteModule.ready
8576  };
8577});
8578
8579/***/ }),
8580/* 153 */
8581/***/ (function(module, exports, __webpack_require__) {
8582
8583"use strict";
8584 // @wf-will-never-add-flow-to-this-file
8585// Include tram for frame-throttling
8586
8587/* globals window */
8588
8589/* eslint-disable no-var */
8590
8591var $ = window.$;
8592var tram = __webpack_require__(91) && $.tram;
8593/*!
8594 * Webflow._ (aka) Underscore.js 1.6.0 (custom build)
8595 * _.each
8596 * _.map
8597 * _.find
8598 * _.filter
8599 * _.any
8600 * _.contains
8601 * _.delay
8602 * _.defer
8603 * _.throttle (webflow)
8604 * _.debounce
8605 * _.keys
8606 * _.has
8607 * _.now
8608 *
8609 * http://underscorejs.org
8610 * (c) 2009-2013 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
8611 * Underscore may be freely distributed under the MIT license.
8612 * @license MIT
8613 */
8614
8615module.exports = function () {
8616  var _ = {}; // Current version.
8617
8618  _.VERSION = '1.6.0-Webflow'; // Establish the object that gets returned to break out of a loop iteration.
8619
8620  var breaker = {}; // Save bytes in the minified (but not gzipped) version:
8621
8622  /* eslint-disable one-var */
8623
8624  var ArrayProto = Array.prototype,
8625      ObjProto = Object.prototype,
8626      FuncProto = Function.prototype;
8627  /* eslint-enable one-var */
8628  // Create quick reference variables for speed access to core prototypes.
8629
8630  /* eslint-disable one-var, no-unused-vars */
8631
8632  var push = ArrayProto.push,
8633      slice = ArrayProto.slice,
8634      concat = ArrayProto.concat,
8635      toString = ObjProto.toString,
8636      hasOwnProperty = ObjProto.hasOwnProperty;
8637  /* eslint-enable one-var, no-unused-vars */
8638  // All **ECMAScript 5** native function implementations that we hope to use
8639  // are declared here.
8640
8641  /* eslint-disable one-var, no-unused-vars */
8642
8643  var nativeForEach = ArrayProto.forEach,
8644      nativeMap = ArrayProto.map,
8645      nativeReduce = ArrayProto.reduce,
8646      nativeReduceRight = ArrayProto.reduceRight,
8647      nativeFilter = ArrayProto.filter,
8648      nativeEvery = ArrayProto.every,
8649      nativeSome = ArrayProto.some,
8650      nativeIndexOf = ArrayProto.indexOf,
8651      nativeLastIndexOf = ArrayProto.lastIndexOf,
8652      nativeIsArray = Array.isArray,
8653      nativeKeys = Object.keys,
8654      nativeBind = FuncProto.bind;
8655  /* eslint-enable one-var, no-unused-vars */
8656  // Collection Functions
8657  // --------------------
8658  // The cornerstone, an `each` implementation, aka `forEach`.
8659  // Handles objects with the built-in `forEach`, arrays, and raw objects.
8660  // Delegates to **ECMAScript 5**'s native `forEach` if available.
8661
8662  var each = _.each = _.forEach = function (obj, iterator, context) {
8663    /* jshint shadow:true */
8664    if (obj == null) return obj;
8665
8666    if (nativeForEach && obj.forEach === nativeForEach) {
8667      obj.forEach(iterator, context); // eslint-disable-next-line no-implicit-coercion
8668    } else if (obj.length === +obj.length) {
8669      for (var i = 0, length = obj.length; i < length; i++) {
8670        if (iterator.call(context, obj[i], i, obj) === breaker) return;
8671      }
8672    } else {
8673      var keys = _.keys(obj); // eslint-disable-next-line no-redeclare
8674
8675
8676      for (var i = 0, length = keys.length; i < length; i++) {
8677        if (iterator.call(context, obj[keys[i]], keys[i], obj) === breaker) return;
8678      }
8679    }
8680
8681    return obj;
8682  }; // Return the results of applying the iterator to each element.
8683  // Delegates to **ECMAScript 5**'s native `map` if available.
8684
8685
8686  _.map = _.collect = function (obj, iterator, context) {
8687    var results = [];
8688    if (obj == null) return results;
8689    if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
8690    each(obj, function (value, index, list) {
8691      results.push(iterator.call(context, value, index, list));
8692    });
8693    return results;
8694  }; // Return the first value which passes a truth test. Aliased as `detect`.
8695
8696
8697  _.find = _.detect = function (obj, predicate, context) {
8698    var result;
8699    any(obj, function (value, index, list) {
8700      if (predicate.call(context, value, index, list)) {
8701        result = value;
8702        return true;
8703      }
8704    });
8705    return result;
8706  }; // Return all the elements that pass a truth test.
8707  // Delegates to **ECMAScript 5**'s native `filter` if available.
8708  // Aliased as `select`.
8709
8710
8711  _.filter = _.select = function (obj, predicate, context) {
8712    var results = [];
8713    if (obj == null) return results;
8714    if (nativeFilter && obj.filter === nativeFilter) return obj.filter(predicate, context);
8715    each(obj, function (value, index, list) {
8716      if (predicate.call(context, value, index, list)) results.push(value);
8717    });
8718    return results;
8719  }; // Determine if at least one element in the object matches a truth test.
8720  // Delegates to **ECMAScript 5**'s native `some` if available.
8721  // Aliased as `any`.
8722
8723
8724  var any = _.some = _.any = function (obj, predicate, context) {
8725    predicate || (predicate = _.identity);
8726    var result = false;
8727    if (obj == null) return result;
8728    if (nativeSome && obj.some === nativeSome) return obj.some(predicate, context);
8729    each(obj, function (value, index, list) {
8730      if (result || (result = predicate.call(context, value, index, list))) return breaker;
8731    });
8732    return !!result; // eslint-disable-line no-implicit-coercion
8733  }; // Determine if the array or object contains a given value (using `===`).
8734  // Aliased as `include`.
8735
8736
8737  _.contains = _.include = function (obj, target) {
8738    if (obj == null) return false;
8739    if (nativeIndexOf && obj.indexOf === nativeIndexOf) // eslint-disable-next-line eqeqeq
8740      return obj.indexOf(target) != -1;
8741    return any(obj, function (value) {
8742      return value === target;
8743    });
8744  }; // Function (ahem) Functions
8745  // --------------------
8746  // Delays a function for the given number of milliseconds, and then calls
8747  // it with the arguments supplied.
8748
8749
8750  _.delay = function (func, wait) {
8751    var args = slice.call(arguments, 2);
8752    return setTimeout(function () {
8753      return func.apply(null, args);
8754    }, wait);
8755  }; // Defers a function, scheduling it to run after the current call stack has
8756  // cleared.
8757
8758
8759  _.defer = function (func) {
8760    return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
8761  }; // Returns a function, that, when invoked, will only be triggered once every
8762  // browser animation frame - using tram's requestAnimationFrame polyfill.
8763
8764
8765  _.throttle = function (func) {
8766    // eslint-disable-next-line one-var
8767    var wait, args, context;
8768    return function () {
8769      if (wait) return;
8770      wait = true;
8771      args = arguments;
8772      context = this;
8773      tram.frame(function () {
8774        wait = false;
8775        func.apply(context, args);
8776      });
8777    };
8778  }; // Returns a function, that, as long as it continues to be invoked, will not
8779  // be triggered. The function will be called after it stops being called for
8780  // N milliseconds. If `immediate` is passed, trigger the function on the
8781  // leading edge, instead of the trailing.
8782
8783
8784  _.debounce = function (func, wait, immediate) {
8785    // eslint-disable-next-line one-var
8786    var timeout, args, context, timestamp, result;
8787
8788    var later = function later() {
8789      var last = _.now() - timestamp;
8790
8791      if (last < wait) {
8792        timeout = setTimeout(later, wait - last);
8793      } else {
8794        timeout = null;
8795
8796        if (!immediate) {
8797          result = func.apply(context, args);
8798          context = args = null;
8799        }
8800      }
8801    };
8802
8803    return function () {
8804      context = this;
8805      args = arguments;
8806      timestamp = _.now();
8807      var callNow = immediate && !timeout;
8808
8809      if (!timeout) {
8810        timeout = setTimeout(later, wait);
8811      }
8812
8813      if (callNow) {
8814        result = func.apply(context, args);
8815        context = args = null;
8816      }
8817
8818      return result;
8819    };
8820  }; // Object Functions
8821  // ----------------
8822  // Fill in a given object with default properties.
8823
8824
8825  _.defaults = function (obj) {
8826    if (!_.isObject(obj)) return obj;
8827
8828    for (var i = 1, length = arguments.length; i < length; i++) {
8829      var source = arguments[i];
8830
8831      for (var prop in source) {
8832        // eslint-disable-next-line no-void
8833        if (obj[prop] === void 0) obj[prop] = source[prop];
8834      }
8835    }
8836
8837    return obj;
8838  }; // Retrieve the names of an object's properties.
8839  // Delegates to **ECMAScript 5**'s native `Object.keys`
8840
8841
8842  _.keys = function (obj) {
8843    if (!_.isObject(obj)) return [];
8844    if (nativeKeys) return nativeKeys(obj);
8845    var keys = [];
8846
8847    for (var key in obj) {
8848      if (_.has(obj, key)) keys.push(key);
8849    }
8850
8851    return keys;
8852  }; // Shortcut function for checking if an object has a given property directly
8853  // on itself (in other words, not on a prototype).
8854
8855
8856  _.has = function (obj, key) {
8857    return hasOwnProperty.call(obj, key);
8858  }; // Is a given variable an object?
8859
8860
8861  _.isObject = function (obj) {
8862    return obj === Object(obj);
8863  }; // Utility Functions
8864  // -----------------
8865  // A (possibly faster) way to get the current timestamp as an integer.
8866
8867
8868  _.now = Date.now || function () {
8869    return new Date().getTime();
8870  }; // By default, Underscore uses ERB-style template delimiters, change the
8871  // following template settings to use alternative delimiters.
8872
8873
8874  _.templateSettings = {
8875    evaluate: /<%([\s\S]+?)%>/g,
8876    interpolate: /<%=([\s\S]+?)%>/g,
8877    escape: /<%-([\s\S]+?)%>/g
8878  }; // When customizing `templateSettings`, if you don't want to define an
8879  // interpolation, evaluation or escaping regex, we need one that is
8880  // guaranteed not to match.
8881
8882  var noMatch = /(.)^/; // Certain characters need to be escaped so that they can be put into a
8883  // string literal.
8884
8885  var escapes = {
8886    "'": "'",
8887    '\\': '\\',
8888    '\r': 'r',
8889    '\n': 'n',
8890    "\u2028": 'u2028',
8891    "\u2029": 'u2029'
8892  };
8893  var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
8894
8895  var escapeChar = function escapeChar(match) {
8896    return '\\' + escapes[match];
8897  }; // JavaScript micro-templating, similar to John Resig's implementation.
8898  // Underscore templating handles arbitrary delimiters, preserves whitespace,
8899  // and correctly escapes quotes within interpolated code.
8900  // NB: `oldSettings` only exists for backwards compatibility.
8901
8902
8903  _.template = function (text, settings, oldSettings) {
8904    if (!settings && oldSettings) settings = oldSettings;
8905    settings = _.defaults({}, settings, _.templateSettings); // Combine delimiters into one regular expression via alternation.
8906
8907    var matcher = RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g'); // Compile the template source, escaping string literals appropriately.
8908
8909    var index = 0;
8910    var source = "__p+='";
8911    text.replace(matcher, function (match, escape, interpolate, evaluate, offset) {
8912      source += text.slice(index, offset).replace(escaper, escapeChar);
8913      index = offset + match.length;
8914
8915      if (escape) {
8916        source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
8917      } else if (interpolate) {
8918        source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
8919      } else if (evaluate) {
8920        source += "';\n" + evaluate + "\n__p+='";
8921      } // Adobe VMs need the match returned to produce the correct offest.
8922
8923
8924      return match;
8925    });
8926    source += "';\n"; // If a variable is not specified, place data values in local scope.
8927
8928    if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
8929    source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n';
8930
8931    try {
8932      // eslint-disable-next-line no-new-func
8933      var render = new Function(settings.variable || 'obj', '_', source);
8934    } catch (e) {
8935      e.source = source;
8936      throw e;
8937    }
8938
8939    var template = function template(data) {
8940      return render.call(this, data, _);
8941    }; // Provide the compiled source as a convenience for precompilation.
8942
8943
8944    var argument = settings.variable || 'obj';
8945    template.source = 'function(' + argument + '){\n' + source + '}';
8946    return template;
8947  }; // Export underscore
8948
8949
8950  return _;
8951}();
8952/* eslint-enable */
8953
8954/***/ }),
8955/* 154 */
8956/***/ (function(module, exports, __webpack_require__) {
8957
8958"use strict";
8959
8960
8961var _interopRequireDefault2 = __webpack_require__(1);
8962
8963var _classCallCheck2 = _interopRequireDefault2(__webpack_require__(155));
8964
8965var _createClass2 = _interopRequireDefault2(__webpack_require__(156));
8966
8967var _interopRequireDefault = __webpack_require__(1);
8968
8969Object.defineProperty(exports, "__esModule", {
8970  value: true
8971});
8972exports.ready = exports.destroy = exports.init = exports.cleanupElement = exports.createInstance = void 0;
8973
8974var _extends2 = _interopRequireDefault(__webpack_require__(30));
8975
8976var _defineProperty2 = _interopRequireDefault(__webpack_require__(31));
8977
8978var _findIndex = _interopRequireDefault(__webpack_require__(92));
8979
8980__webpack_require__(225);
8981/* eslint-env browser */
8982
8983
8984var getLottieLibrary = function getLottieLibrary() {
8985  return window.Webflow.require('lottie').lottie;
8986};
8987
8988var isInDesigner = function isInDesigner() {
8989  return Boolean(window.Webflow.env('design') || window.Webflow.env('preview'));
8990};
8991
8992var PlayerState = {
8993  Playing: 'playing',
8994  Stopped: 'stopped'
8995};
8996
8997var Cache =
8998/*#__PURE__*/
8999function () {
9000  function Cache() {
9001    (0, _classCallCheck2["default"])(this, Cache);
9002    (0, _defineProperty2["default"])(this, "_cache", []);
9003  }
9004
9005  (0, _createClass2["default"])(Cache, [{
9006    key: "set",
9007    value: function set(container, instance) {
9008      var index = (0, _findIndex["default"])(this._cache, function (_ref) {
9009        var wrapper = _ref.wrapper;
9010        return wrapper === container;
9011      });
9012      if (index !== -1) this._cache.splice(index, 1);
9013
9014      this._cache.push({
9015        wrapper: container,
9016        instance: instance
9017      });
9018    }
9019  }, {
9020    key: "delete",
9021    value: function _delete(container) {
9022      var index = (0, _findIndex["default"])(this._cache, function (_ref2) {
9023        var wrapper = _ref2.wrapper;
9024        return wrapper === container;
9025      });
9026      if (index !== -1) this._cache.splice(index, 1);
9027    }
9028  }, {
9029    key: "get",
9030    value: function get(container) {
9031      var index = (0, _findIndex["default"])(this._cache, function (_ref3) {
9032        var wrapper = _ref3.wrapper;
9033        return wrapper === container;
9034      });
9035      return index !== -1 ? this._cache[index].instance : null;
9036    }
9037  }]);
9038  return Cache;
9039}();
9040
9041var cache = new Cache();
9042var emptyObject = {};
9043
9044var LottieInstance =
9045/*#__PURE__*/
9046function () {
9047  function LottieInstance() {
9048    (0, _classCallCheck2["default"])(this, LottieInstance);
9049    (0, _defineProperty2["default"])(this, "config", null);
9050    (0, _defineProperty2["default"])(this, "currentState", PlayerState.Stopped);
9051    (0, _defineProperty2["default"])(this, "handlers", {
9052      enterFrame: [],
9053      complete: [],
9054      loop: [],
9055      dataReady: [],
9056      destroy: [],
9057      error: []
9058    });
9059  }
9060
9061  (0, _createClass2["default"])(LottieInstance, [{
9062    key: "load",
9063    value: function load(container) {
9064      var _this = this;
9065
9066      var dataset = container.dataset || emptyObject;
9067      var src = dataset.src || ''; // Available options here https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/preserveAspectRatio
9068
9069      var preserveAspectRatio = dataset.preserveAspectRatio || 'xMidYMid meet';
9070      var renderer = dataset.renderer || 'svg';
9071      var loop = parseFloat(dataset.loop) === 1;
9072      var direction = parseFloat(dataset.direction) || 1;
9073      var autoplay = parseFloat(dataset.autoplay) === 1;
9074      var duration = parseFloat(dataset.duration) || 0;
9075      var hasIx2 = parseFloat(dataset.isIx2Target) === 1;
9076      var ix2InitialValue = parseFloat(dataset.ix2InitialState);
9077
9078      if (isNaN(ix2InitialValue)) {
9079        ix2InitialValue = null;
9080      }
9081
9082      var config = {
9083        src: src,
9084        loop: loop,
9085        autoplay: autoplay,
9086        renderer: renderer,
9087        direction: direction,
9088        duration: duration,
9089        hasIx2: hasIx2,
9090        ix2InitialValue: ix2InitialValue,
9091        preserveAspectRatio: preserveAspectRatio
9092      }; // If it's the same path/src, don't destroy the animation
9093
9094      if (this.animationItem && this.config && this.config.src === src && renderer === this.config.renderer && preserveAspectRatio === this.config.preserveAspectRatio) {
9095        if (loop !== this.config.loop) {
9096          this.setLooping(loop);
9097        }
9098
9099        if (!hasIx2) {
9100          if (direction !== this.config.direction) {
9101            this.setDirection(direction);
9102          }
9103
9104          if (duration !== this.config.duration) {
9105            if (duration > 0 && duration !== this.duration) {
9106              this.setSpeed(this.duration / duration);
9107            } else {
9108              this.setSpeed(1);
9109            }
9110          }
9111        }
9112
9113        if (autoplay) {
9114          this.play();
9115        }
9116
9117        if (ix2InitialValue && ix2InitialValue !== this.config.ix2InitialValue) {
9118          var percent = ix2InitialValue / 100;
9119          this.goToFrame(this.frames * percent);
9120        }
9121
9122        this.config = config;
9123        return;
9124      }
9125
9126      var options = {
9127        container: container,
9128        loop: loop,
9129        autoplay: autoplay,
9130        renderer: renderer,
9131        rendererSettings: {
9132          preserveAspectRatio: preserveAspectRatio,
9133          progressiveLoad: true,
9134          hideOnTransparent: true
9135        }
9136      };
9137
9138      try {
9139        // Clear previous animation, if any
9140        if (this.animationItem) {
9141          this.destroy();
9142        } // Initialize lottie player and load animation
9143
9144
9145        this.animationItem = getLottieLibrary().loadAnimation((0, _extends2["default"])({}, options, {
9146          path: src
9147        }));
9148      } catch (err) {
9149        this.handlers.error.forEach(function (cb) {
9150          return cb(err);
9151        });
9152        return;
9153      }
9154
9155      if (!this.animationItem) return;
9156
9157      if (isInDesigner()) {
9158        // Calculate and save the current progress of the animation
9159        this.animationItem.addEventListener('enterFrame', function () {
9160          if (!_this.isPlaying) return;
9161          var _this$animationItem = _this.animationItem,
9162              currentFrame = _this$animationItem.currentFrame,
9163              totalFrames = _this$animationItem.totalFrames,
9164              playDirection = _this$animationItem.playDirection;
9165          var toPercent = currentFrame / totalFrames * 100;
9166          var percentage = Math.round(playDirection === 1 ? toPercent : 100 - toPercent);
9167
9168          _this.handlers.enterFrame.forEach(function (cb) {
9169            return cb(percentage, currentFrame);
9170          });
9171        }); // Handle animation play complete
9172
9173        this.animationItem.addEventListener('complete', function () {
9174          if (_this.currentState !== PlayerState.Playing) {
9175            _this.handlers.complete.forEach(function (cb) {
9176              return cb();
9177            });
9178
9179            return;
9180          }
9181
9182          if (!_this.animationItem.loop) {
9183            _this.handlers.complete.forEach(function (cb) {
9184              return cb();
9185            });
9186
9187            return;
9188          }
9189
9190          _this.currentState = PlayerState.Stopped;
9191        }); // Handle animation play complete
9192
9193        this.animationItem.addEventListener('loopComplete', function (loopComplete) {
9194          _this.handlers.loop.forEach(function (cb) {
9195            return cb(loopComplete);
9196          });
9197        }); // Set error state when animation load fail event triggers
9198
9199        this.animationItem.addEventListener('data_failed', function (err) {
9200          _this.handlers.error.forEach(function (cb) {
9201            return cb(err);
9202          });
9203        }); // Set error state when animation load fail event triggers
9204
9205        this.animationItem.addEventListener('error', function (err) {
9206          _this.handlers.error.forEach(function (cb) {
9207            return cb(err);
9208          });
9209        });
9210      }
9211
9212      if (this.isLoaded) {
9213        this.handlers.dataReady.forEach(function (cb) {
9214          return cb();
9215        });
9216
9217        if (autoplay) {
9218          this.play();
9219        }
9220      } else {
9221        // Handle animation data load complete
9222        this.animationItem.addEventListener('data_ready', function () {
9223          _this.handlers.dataReady.forEach(function (cb) {
9224            return cb();
9225          }); // Only set the direction and speed if no IX2 is attached
9226
9227
9228          if (!hasIx2) {
9229            _this.setDirection(direction);
9230
9231            if (duration > 0 && duration !== _this.duration) {
9232              _this.setSpeed(_this.duration / duration);
9233            }
9234
9235            if (autoplay) {
9236              _this.play();
9237            }
9238          } // Set the animation's initial state value from IX2
9239
9240
9241          if (ix2InitialValue) {
9242            var _percent = ix2InitialValue / 100;
9243
9244            _this.goToFrame(_this.frames * _percent);
9245          }
9246        });
9247      }
9248
9249      cache.set(container, this);
9250      this.container = container;
9251      this.config = config;
9252    }
9253  }, {
9254    key: "onFrameChange",
9255    value: function onFrameChange(cb) {
9256      if (this.handlers.enterFrame.indexOf(cb) === -1) {
9257        this.handlers.enterFrame.push(cb);
9258      }
9259    }
9260  }, {
9261    key: "onPlaybackComplete",
9262    value: function onPlaybackComplete(cb) {
9263      if (this.handlers.complete.indexOf(cb) === -1) {
9264        this.handlers.complete.push(cb);
9265      }
9266    }
9267  }, {
9268    key: "onLoopComplete",
9269    value: function onLoopComplete(cb) {
9270      if (this.handlers.loop.indexOf(cb) === -1) {
9271        this.handlers.loop.push(cb);
9272      }
9273    }
9274  }, {
9275    key: "onDestroy",
9276    value: function onDestroy(cb) {
9277      if (this.handlers.destroy.indexOf(cb) === -1) {
9278        this.handlers.destroy.push(cb);
9279      }
9280    }
9281  }, {
9282    key: "onDataReady",
9283    value: function onDataReady(cb) {
9284      if (this.handlers.dataReady.indexOf(cb) === -1) {
9285        this.handlers.dataReady.push(cb);
9286      }
9287    }
9288  }, {
9289    key: "onError",
9290    value: function onError(cb) {
9291      if (this.handlers.error.indexOf(cb) === -1) {
9292        this.handlers.error.push(cb);
9293      }
9294    }
9295  }, {
9296    key: "play",
9297    value: function play() {
9298      if (!this.animationItem) return;
9299      var frame = this.animationItem.playDirection === 1 ? 0 : this.frames;
9300      this.animationItem.goToAndPlay(frame, true);
9301      this.currentState = PlayerState.Playing;
9302    }
9303  }, {
9304    key: "stop",
9305    value: function stop() {
9306      if (!this.animationItem) return;
9307
9308      if (this.isPlaying) {
9309        var playDirection = this.animationItem.playDirection;
9310        var frame = playDirection === 1 ? 0 : this.frames;
9311        this.animationItem.goToAndStop(frame, true);
9312      }
9313
9314      this.currentState = PlayerState.Stopped;
9315    }
9316  }, {
9317    key: "destroy",
9318    value: function destroy() {
9319      var _this2 = this;
9320
9321      if (!this.animationItem) return;
9322      if (this.isPlaying) this.stop();
9323      this.handlers.destroy.forEach(function (cb) {
9324        return cb();
9325      });
9326
9327      if (this.container) {
9328        cache["delete"](this.container);
9329      }
9330
9331      this.animationItem.destroy();
9332      Object.keys(this.handlers).forEach(function (key) {
9333        return _this2.handlers[key].length = 0;
9334      });
9335      this.animationItem = null;
9336      this.container = null;
9337      this.config = null;
9338    }
9339  }, {
9340    key: "goToFrame",
9341    value: function goToFrame(value) {
9342      if (!this.animationItem) return;
9343      this.animationItem.setCurrentRawFrameValue(value);
9344    }
9345  }, {
9346    key: "setSubframe",
9347    value: function setSubframe(value) {
9348      if (!this.animationItem) return;
9349      this.animationItem.setSubframe(value);
9350    }
9351  }, {
9352    key: "setSpeed",
9353    value: function setSpeed() {
9354      var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
9355      if (!this.animationItem) return;
9356      if (this.isPlaying) this.stop();
9357      this.animationItem.setSpeed(value);
9358    }
9359  }, {
9360    key: "setLooping",
9361    value: function setLooping(value) {
9362      if (!this.animationItem) return;
9363      if (this.isPlaying) this.stop();
9364      this.animationItem.loop = value;
9365    }
9366  }, {
9367    key: "setDirection",
9368    value: function setDirection(value) {
9369      if (!this.animationItem) return;
9370      if (this.isPlaying) this.stop();
9371      this.animationItem.setDirection(value);
9372      this.goToFrame(value === 1 ? 0 : this.frames);
9373    }
9374  }, {
9375    key: "isPlaying",
9376    get: function get() {
9377      if (!this.animationItem) return false;
9378      return !this.animationItem.isPaused;
9379    }
9380  }, {
9381    key: "isPaused",
9382    get: function get() {
9383      if (!this.animationItem) return false;
9384      return this.animationItem.isPaused;
9385    }
9386  }, {
9387    key: "duration",
9388    get: function get() {
9389      if (!this.animationItem) return 0;
9390      return this.animationItem.getDuration();
9391    }
9392  }, {
9393    key: "frames",
9394    get: function get() {
9395      if (!this.animationItem) return 0;
9396      return this.animationItem.totalFrames;
9397    }
9398  }, {
9399    key: "direction",
9400    get: function get() {
9401      if (!this.animationItem) return 1;
9402      return this.animationItem.playDirection;
9403    }
9404  }, {
9405    key: "isLoaded",
9406    get: function get() {
9407      if (!this.animationItem) false;
9408      return this.animationItem.isLoaded;
9409    }
9410  }, {
9411    key: "ix2InitialValue",
9412    get: function get() {
9413      return this.config ? this.config.ix2InitialValue : null;
9414    }
9415  }]);
9416  return LottieInstance;
9417}();
9418
9419var getLottieElements = function getLottieElements() {
9420  return Array.from(document.querySelectorAll('[data-animation-type="lottie"]'));
9421};
9422
9423var createInstance = function createInstance(container) {
9424  var lottieInstance = cache.get(container);
9425
9426  if (lottieInstance == null) {
9427    lottieInstance = new LottieInstance();
9428  }
9429
9430  lottieInstance.load(container);
9431  return lottieInstance;
9432};
9433
9434exports.createInstance = createInstance;
9435
9436var cleanupElement = function cleanupElement(element) {
9437  var lottieInstance = cache.get(element);
9438
9439  if (lottieInstance) {
9440    lottieInstance.destroy();
9441  }
9442};
9443
9444exports.cleanupElement = cleanupElement;
9445
9446var init = function init() {
9447  getLottieElements().forEach(function (element) {
9448    var hasIx2 = parseFloat(element.getAttribute('data-is-ix2-target')) === 1;
9449
9450    if (!hasIx2) {
9451      cleanupElement(element);
9452    }
9453
9454    createInstance(element);
9455  });
9456};
9457
9458exports.init = init;
9459
9460var destroy = function destroy() {
9461  getLottieElements().forEach(cleanupElement);
9462};
9463
9464exports.destroy = destroy;
9465var ready = init;
9466exports.ready = ready;
9467
9468/***/ }),
9469/* 155 */
9470/***/ (function(module, exports) {
9471
9472function _classCallCheck(instance, Constructor) {
9473  if (!(instance instanceof Constructor)) {
9474    throw new TypeError("Cannot call a class as a function");
9475  }
9476}
9477
9478module.exports = _classCallCheck;
9479
9480/***/ }),
9481/* 156 */
9482/***/ (function(module, exports) {
9483
9484function _defineProperties(target, props) {
9485  for (var i = 0; i < props.length; i++) {
9486    var descriptor = props[i];
9487    descriptor.enumerable = descriptor.enumerable || false;
9488    descriptor.configurable = true;
9489    if ("value" in descriptor) descriptor.writable = true;
9490    Object.defineProperty(target, descriptor.key, descriptor);
9491  }
9492}
9493
9494function _createClass(Constructor, protoProps, staticProps) {
9495  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
9496  if (staticProps) _defineProperties(Constructor, staticProps);
9497  return Constructor;
9498}
9499
9500module.exports = _createClass;
9501
9502/***/ }),
9503/* 157 */
9504/***/ (function(module, exports, __webpack_require__) {
9505
9506var baseIsMatch = __webpack_require__(158),
9507    getMatchData = __webpack_require__(210),
9508    matchesStrictComparable = __webpack_require__(108);
9509
9510/**
9511 * The base implementation of `_.matches` which doesn't clone `source`.
9512 *
9513 * @private
9514 * @param {Object} source The object of property values to match.
9515 * @returns {Function} Returns the new spec function.
9516 */
9517function baseMatches(source) {
9518  var matchData = getMatchData(source);
9519  if (matchData.length == 1 && matchData[0][2]) {
9520    return matchesStrictComparable(matchData[0][0], matchData[0][1]);
9521  }
9522  return function(object) {
9523    return object === source || baseIsMatch(object, source, matchData);
9524  };
9525}
9526
9527module.exports = baseMatches;
9528
9529
9530/***/ }),
9531/* 158 */
9532/***/ (function(module, exports, __webpack_require__) {
9533
9534var Stack = __webpack_require__(94),
9535    baseIsEqual = __webpack_require__(98);
9536
9537/** Used to compose bitmasks for value comparisons. */
9538var COMPARE_PARTIAL_FLAG = 1,
9539    COMPARE_UNORDERED_FLAG = 2;
9540
9541/**
9542 * The base implementation of `_.isMatch` without support for iteratee shorthands.
9543 *
9544 * @private
9545 * @param {Object} object The object to inspect.
9546 * @param {Object} source The object of property values to match.
9547 * @param {Array} matchData The property names, values, and compare flags to match.
9548 * @param {Function} [customizer] The function to customize comparisons.
9549 * @returns {boolean} Returns `true` if `object` is a match, else `false`.
9550 */
9551function baseIsMatch(object, source, matchData, customizer) {
9552  var index = matchData.length,
9553      length = index,
9554      noCustomizer = !customizer;
9555
9556  if (object == null) {
9557    return !length;
9558  }
9559  object = Object(object);
9560  while (index--) {
9561    var data = matchData[index];
9562    if ((noCustomizer && data[2])
9563          ? data[1] !== object[data[0]]
9564          : !(data[0] in object)
9565        ) {
9566      return false;
vendor: 4,246 bytes, lines 9567-9783
9567    }
9568  }
9569  while (++index < length) {
9570    data = matchData[index];
9571    var key = data[0],
9572        objValue = object[key],
9573        srcValue = data[1];
9574
9575    if (noCustomizer && data[2]) {
9576      if (objValue === undefined && !(key in object)) {
9577        return false;
9578      }
9579    } else {
9580      var stack = new Stack;
9581      if (customizer) {
9582        var result = customizer(objValue, srcValue, key, object, source, stack);
9583      }
9584      if (!(result === undefined
9585            ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
9586            : result
9587          )) {
9588        return false;
9589      }
9590    }
9591  }
9592  return true;
9593}
9594
9595module.exports = baseIsMatch;
9596
9597
9598/***/ }),
9599/* 159 */
9600/***/ (function(module, exports) {
9601
9602/**
9603 * Removes all key-value entries from the list cache.
9604 *
9605 * @private
9606 * @name clear
9607 * @memberOf ListCache
9608 */
9609function listCacheClear() {
9610  this.__data__ = [];
9611  this.size = 0;
9612}
9613
9614module.exports = listCacheClear;
9615
9616
9617/***/ }),
9618/* 160 */
9619/***/ (function(module, exports, __webpack_require__) {
9620
9621var assocIndexOf = __webpack_require__(43);
9622
9623/** Used for built-in method references. */
9624var arrayProto = Array.prototype;
9625
9626/** Built-in value references. */
9627var splice = arrayProto.splice;
9628
9629/**
9630 * Removes `key` and its value from the list cache.
9631 *
9632 * @private
9633 * @name delete
9634 * @memberOf ListCache
9635 * @param {string} key The key of the value to remove.
9636 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
9637 */
9638function listCacheDelete(key) {
9639  var data = this.__data__,
9640      index = assocIndexOf(data, key);
9641
9642  if (index < 0) {
9643    return false;
9644  }
9645  var lastIndex = data.length - 1;
9646  if (index == lastIndex) {
9647    data.pop();
9648  } else {
9649    splice.call(data, index, 1);
9650  }
9651  --this.size;
9652  return true;
9653}
9654
9655module.exports = listCacheDelete;
9656
9657
9658/***/ }),
9659/* 161 */
9660/***/ (function(module, exports, __webpack_require__) {
9661
9662var assocIndexOf = __webpack_require__(43);
9663
9664/**
9665 * Gets the list cache value for `key`.
9666 *
9667 * @private
9668 * @name get
9669 * @memberOf ListCache
9670 * @param {string} key The key of the value to get.
9671 * @returns {*} Returns the entry value.
9672 */
9673function listCacheGet(key) {
9674  var data = this.__data__,
9675      index = assocIndexOf(data, key);
9676
9677  return index < 0 ? undefined : data[index][1];
9678}
9679
9680module.exports = listCacheGet;
9681
9682
9683/***/ }),
9684/* 162 */
9685/***/ (function(module, exports, __webpack_require__) {
9686
9687var assocIndexOf = __webpack_require__(43);
9688
9689/**
9690 * Checks if a list cache value for `key` exists.
9691 *
9692 * @private
9693 * @name has
9694 * @memberOf ListCache
9695 * @param {string} key The key of the entry to check.
9696 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
9697 */
9698function listCacheHas(key) {
9699  return assocIndexOf(this.__data__, key) > -1;
9700}
9701
9702module.exports = listCacheHas;
9703
9704
9705/***/ }),
9706/* 163 */
9707/***/ (function(module, exports, __webpack_require__) {
9708
9709var assocIndexOf = __webpack_require__(43);
9710
9711/**
9712 * Sets the list cache `key` to `value`.
9713 *
9714 * @private
9715 * @name set
9716 * @memberOf ListCache
9717 * @param {string} key The key of the value to set.
9718 * @param {*} value The value to set.
9719 * @returns {Object} Returns the list cache instance.
9720 */
9721function listCacheSet(key, value) {
9722  var data = this.__data__,
9723      index = assocIndexOf(data, key);
9724
9725  if (index < 0) {
9726    ++this.size;
9727    data.push([key, value]);
9728  } else {
9729    data[index][1] = value;
9730  }
9731  return this;
9732}
9733
9734module.exports = listCacheSet;
9735
9736
9737/***/ }),
9738/* 164 */
9739/***/ (function(module, exports, __webpack_require__) {
9740
9741var ListCache = __webpack_require__(42);
9742
9743/**
9744 * Removes all key-value entries from the stack.
9745 *
9746 * @private
9747 * @name clear
9748 * @memberOf Stack
9749 */
9750function stackClear() {
9751  this.__data__ = new ListCache;
9752  this.size = 0;
9753}
9754
9755module.exports = stackClear;
9756
9757
9758/***/ }),
9759/* 165 */
9760/***/ (function(module, exports) {
9761
9762/**
9763 * Removes `key` and its value from the stack.
9764 *
9765 * @private
9766 * @name delete
9767 * @memberOf Stack
9768 * @param {string} key The key of the value to remove.
9769 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
9770 */
9771function stackDelete(key) {
9772  var data = this.__data__,
9773      result = data['delete'](key);
9774
9775  this.size = data.size;
9776  return result;
9777}
9778
9779module.exports = stackDelete;
9780
9781
9782/***/ }),
9783/* 166 */
vendor: 11,193 bytes, lines 9784-10280
9784/***/ (function(module, exports) {
9785
9786/**
9787 * Gets the stack value for `key`.
9788 *
9789 * @private
9790 * @name get
9791 * @memberOf Stack
9792 * @param {string} key The key of the value to get.
9793 * @returns {*} Returns the entry value.
9794 */
9795function stackGet(key) {
9796  return this.__data__.get(key);
9797}
9798
9799module.exports = stackGet;
9800
9801
9802/***/ }),
9803/* 167 */
9804/***/ (function(module, exports) {
9805
9806/**
9807 * Checks if a stack value for `key` exists.
9808 *
9809 * @private
9810 * @name has
9811 * @memberOf Stack
9812 * @param {string} key The key of the entry to check.
9813 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
9814 */
9815function stackHas(key) {
9816  return this.__data__.has(key);
9817}
9818
9819module.exports = stackHas;
9820
9821
9822/***/ }),
9823/* 168 */
9824/***/ (function(module, exports, __webpack_require__) {
9825
9826var ListCache = __webpack_require__(42),
9827    Map = __webpack_require__(58),
9828    MapCache = __webpack_require__(59);
9829
9830/** Used as the size to enable large array optimizations. */
9831var LARGE_ARRAY_SIZE = 200;
9832
9833/**
9834 * Sets the stack `key` to `value`.
9835 *
9836 * @private
9837 * @name set
9838 * @memberOf Stack
9839 * @param {string} key The key of the value to set.
9840 * @param {*} value The value to set.
9841 * @returns {Object} Returns the stack cache instance.
9842 */
9843function stackSet(key, value) {
9844  var data = this.__data__;
9845  if (data instanceof ListCache) {
9846    var pairs = data.__data__;
9847    if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
9848      pairs.push([key, value]);
9849      this.size = ++data.size;
9850      return this;
9851    }
9852    data = this.__data__ = new MapCache(pairs);
9853  }
9854  data.set(key, value);
9855  this.size = data.size;
9856  return this;
9857}
9858
9859module.exports = stackSet;
9860
9861
9862/***/ }),
9863/* 169 */
9864/***/ (function(module, exports, __webpack_require__) {
9865
9866var isFunction = __webpack_require__(95),
9867    isMasked = __webpack_require__(172),
9868    isObject = __webpack_require__(12),
9869    toSource = __webpack_require__(97);
9870
9871/**
9872 * Used to match `RegExp`
9873 * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
9874 */
9875var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
9876
9877/** Used to detect host constructors (Safari). */
9878var reIsHostCtor = /^\[object .+?Constructor\]$/;
9879
9880/** Used for built-in method references. */
9881var funcProto = Function.prototype,
9882    objectProto = Object.prototype;
9883
9884/** Used to resolve the decompiled source of functions. */
9885var funcToString = funcProto.toString;
9886
9887/** Used to check objects for own properties. */
9888var hasOwnProperty = objectProto.hasOwnProperty;
9889
9890/** Used to detect if a method is native. */
9891var reIsNative = RegExp('^' +
9892  funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
9893  .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
9894);
9895
9896/**
9897 * The base implementation of `_.isNative` without bad shim checks.
9898 *
9899 * @private
9900 * @param {*} value The value to check.
9901 * @returns {boolean} Returns `true` if `value` is a native function,
9902 *  else `false`.
9903 */
9904function baseIsNative(value) {
9905  if (!isObject(value) || isMasked(value)) {
9906    return false;
9907  }
9908  var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
9909  return pattern.test(toSource(value));
9910}
9911
9912module.exports = baseIsNative;
9913
9914
9915/***/ }),
9916/* 170 */
9917/***/ (function(module, exports, __webpack_require__) {
9918
9919var Symbol = __webpack_require__(32);
9920
9921/** Used for built-in method references. */
9922var objectProto = Object.prototype;
9923
9924/** Used to check objects for own properties. */
9925var hasOwnProperty = objectProto.hasOwnProperty;
9926
9927/**
9928 * Used to resolve the
9929 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
9930 * of values.
9931 */
9932var nativeObjectToString = objectProto.toString;
9933
9934/** Built-in value references. */
9935var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
9936
9937/**
9938 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
9939 *
9940 * @private
9941 * @param {*} value The value to query.
9942 * @returns {string} Returns the raw `toStringTag`.
9943 */
9944function getRawTag(value) {
9945  var isOwn = hasOwnProperty.call(value, symToStringTag),
9946      tag = value[symToStringTag];
9947
9948  try {
9949    value[symToStringTag] = undefined;
9950    var unmasked = true;
9951  } catch (e) {}
9952
9953  var result = nativeObjectToString.call(value);
9954  if (unmasked) {
9955    if (isOwn) {
9956      value[symToStringTag] = tag;
9957    } else {
9958      delete value[symToStringTag];
9959    }
9960  }
9961  return result;
9962}
9963
9964module.exports = getRawTag;
9965
9966
9967/***/ }),
9968/* 171 */
9969/***/ (function(module, exports) {
9970
9971/** Used for built-in method references. */
9972var objectProto = Object.prototype;
9973
9974/**
9975 * Used to resolve the
9976 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
9977 * of values.
9978 */
9979var nativeObjectToString = objectProto.toString;
9980
9981/**
9982 * Converts `value` to a string using `Object.prototype.toString`.
9983 *
9984 * @private
9985 * @param {*} value The value to convert.
9986 * @returns {string} Returns the converted string.
9987 */
9988function objectToString(value) {
9989  return nativeObjectToString.call(value);
9990}
9991
9992module.exports = objectToString;
9993
9994
9995/***/ }),
9996/* 172 */
9997/***/ (function(module, exports, __webpack_require__) {
9998
9999var coreJsData = __webpack_require__(173);
10000
10001/** Used to detect methods masquerading as native. */
10002var maskSrcKey = (function() {
10003  var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
10004  return uid ? ('Symbol(src)_1.' + uid) : '';
10005}());
10006
10007/**
10008 * Checks if `func` has its source masked.
10009 *
10010 * @private
10011 * @param {Function} func The function to check.
10012 * @returns {boolean} Returns `true` if `func` is masked, else `false`.
10013 */
10014function isMasked(func) {
10015  return !!maskSrcKey && (maskSrcKey in func);
10016}
10017
10018module.exports = isMasked;
10019
10020
10021/***/ }),
10022/* 173 */
10023/***/ (function(module, exports, __webpack_require__) {
10024
10025var root = __webpack_require__(10);
10026
10027/** Used to detect overreaching core-js shims. */
10028var coreJsData = root['__core-js_shared__'];
10029
10030module.exports = coreJsData;
10031
10032
10033/***/ }),
10034/* 174 */
10035/***/ (function(module, exports) {
10036
10037/**
10038 * Gets the value at `key` of `object`.
10039 *
10040 * @private
10041 * @param {Object} [object] The object to query.
10042 * @param {string} key The key of the property to get.
10043 * @returns {*} Returns the property value.
10044 */
10045function getValue(object, key) {
10046  return object == null ? undefined : object[key];
10047}
10048
10049module.exports = getValue;
10050
10051
10052/***/ }),
10053/* 175 */
10054/***/ (function(module, exports, __webpack_require__) {
10055
10056var Hash = __webpack_require__(176),
10057    ListCache = __webpack_require__(42),
10058    Map = __webpack_require__(58);
10059
10060/**
10061 * Removes all key-value entries from the map.
10062 *
10063 * @private
10064 * @name clear
10065 * @memberOf MapCache
10066 */
10067function mapCacheClear() {
10068  this.size = 0;
10069  this.__data__ = {
10070    'hash': new Hash,
10071    'map': new (Map || ListCache),
10072    'string': new Hash
10073  };
10074}
10075
10076module.exports = mapCacheClear;
10077
10078
10079/***/ }),
10080/* 176 */
10081/***/ (function(module, exports, __webpack_require__) {
10082
10083var hashClear = __webpack_require__(177),
10084    hashDelete = __webpack_require__(178),
10085    hashGet = __webpack_require__(179),
10086    hashHas = __webpack_require__(180),
10087    hashSet = __webpack_require__(181);
10088
10089/**
10090 * Creates a hash object.
10091 *
10092 * @private
10093 * @constructor
10094 * @param {Array} [entries] The key-value pairs to cache.
10095 */
10096function Hash(entries) {
10097  var index = -1,
10098      length = entries == null ? 0 : entries.length;
10099
10100  this.clear();
10101  while (++index < length) {
10102    var entry = entries[index];
10103    this.set(entry[0], entry[1]);
10104  }
10105}
10106
10107// Add methods to `Hash`.
10108Hash.prototype.clear = hashClear;
10109Hash.prototype['delete'] = hashDelete;
10110Hash.prototype.get = hashGet;
10111Hash.prototype.has = hashHas;
10112Hash.prototype.set = hashSet;
10113
10114module.exports = Hash;
10115
10116
10117/***/ }),
10118/* 177 */
10119/***/ (function(module, exports, __webpack_require__) {
10120
10121var nativeCreate = __webpack_require__(45);
10122
10123/**
10124 * Removes all key-value entries from the hash.
10125 *
10126 * @private
10127 * @name clear
10128 * @memberOf Hash
10129 */
10130function hashClear() {
10131  this.__data__ = nativeCreate ? nativeCreate(null) : {};
10132  this.size = 0;
10133}
10134
10135module.exports = hashClear;
10136
10137
10138/***/ }),
10139/* 178 */
10140/***/ (function(module, exports) {
10141
10142/**
10143 * Removes `key` and its value from the hash.
10144 *
10145 * @private
10146 * @name delete
10147 * @memberOf Hash
10148 * @param {Object} hash The hash to modify.
10149 * @param {string} key The key of the value to remove.
10150 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
10151 */
10152function hashDelete(key) {
10153  var result = this.has(key) && delete this.__data__[key];
10154  this.size -= result ? 1 : 0;
10155  return result;
10156}
10157
10158module.exports = hashDelete;
10159
10160
10161/***/ }),
10162/* 179 */
10163/***/ (function(module, exports, __webpack_require__) {
10164
10165var nativeCreate = __webpack_require__(45);
10166
10167/** Used to stand-in for `undefined` hash values. */
10168var HASH_UNDEFINED = '__lodash_hash_undefined__';
10169
10170/** Used for built-in method references. */
10171var objectProto = Object.prototype;
10172
10173/** Used to check objects for own properties. */
10174var hasOwnProperty = objectProto.hasOwnProperty;
10175
10176/**
10177 * Gets the hash value for `key`.
10178 *
10179 * @private
10180 * @name get
10181 * @memberOf Hash
10182 * @param {string} key The key of the value to get.
10183 * @returns {*} Returns the entry value.
10184 */
10185function hashGet(key) {
10186  var data = this.__data__;
10187  if (nativeCreate) {
10188    var result = data[key];
10189    return result === HASH_UNDEFINED ? undefined : result;
10190  }
10191  return hasOwnProperty.call(data, key) ? data[key] : undefined;
10192}
10193
10194module.exports = hashGet;
10195
10196
10197/***/ }),
10198/* 180 */
10199/***/ (function(module, exports, __webpack_require__) {
10200
10201var nativeCreate = __webpack_require__(45);
10202
10203/** Used for built-in method references. */
10204var objectProto = Object.prototype;
10205
10206/** Used to check objects for own properties. */
10207var hasOwnProperty = objectProto.hasOwnProperty;
10208
10209/**
10210 * Checks if a hash value for `key` exists.
10211 *
10212 * @private
10213 * @name has
10214 * @memberOf Hash
10215 * @param {string} key The key of the entry to check.
10216 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
10217 */
10218function hashHas(key) {
10219  var data = this.__data__;
10220  return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
10221}
10222
10223module.exports = hashHas;
10224
10225
10226/***/ }),
10227/* 181 */
10228/***/ (function(module, exports, __webpack_require__) {
10229
10230var nativeCreate = __webpack_require__(45);
10231
10232/** Used to stand-in for `undefined` hash values. */
10233var HASH_UNDEFINED = '__lodash_hash_undefined__';
10234
10235/**
10236 * Sets the hash `key` to `value`.
10237 *
10238 * @private
10239 * @name set
10240 * @memberOf Hash
10241 * @param {string} key The key of the value to set.
10242 * @param {*} value The value to set.
10243 * @returns {Object} Returns the hash instance.
10244 */
10245function hashSet(key, value) {
10246  var data = this.__data__;
10247  this.size += this.has(key) ? 0 : 1;
10248  data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
10249  return this;
10250}
10251
10252module.exports = hashSet;
10253
10254
10255/***/ }),
10256/* 182 */
10257/***/ (function(module, exports, __webpack_require__) {
10258
10259var getMapData = __webpack_require__(46);
10260
10261/**
10262 * Removes `key` and its value from the map.
10263 *
10264 * @private
10265 * @name delete
10266 * @memberOf MapCache
10267 * @param {string} key The key of the value to remove.
10268 * @returns {boolean} Returns `true` if the entry was removed, else `false`.
10269 */
10270function mapCacheDelete(key) {
10271  var result = getMapData(this, key)['delete'](key);
10272  this.size -= result ? 1 : 0;
10273  return result;
10274}
10275
10276module.exports = mapCacheDelete;
10277
10278
10279/***/ }),
10280/* 183 */
vendor: 13,822 bytes, lines 10281-10801
10281/***/ (function(module, exports) {
10282
10283/**
10284 * Checks if `value` is suitable for use as unique object key.
10285 *
10286 * @private
10287 * @param {*} value The value to check.
10288 * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
10289 */
10290function isKeyable(value) {
10291  var type = typeof value;
10292  return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
10293    ? (value !== '__proto__')
10294    : (value === null);
10295}
10296
10297module.exports = isKeyable;
10298
10299
10300/***/ }),
10301/* 184 */
10302/***/ (function(module, exports, __webpack_require__) {
10303
10304var getMapData = __webpack_require__(46);
10305
10306/**
10307 * Gets the map value for `key`.
10308 *
10309 * @private
10310 * @name get
10311 * @memberOf MapCache
10312 * @param {string} key The key of the value to get.
10313 * @returns {*} Returns the entry value.
10314 */
10315function mapCacheGet(key) {
10316  return getMapData(this, key).get(key);
10317}
10318
10319module.exports = mapCacheGet;
10320
10321
10322/***/ }),
10323/* 185 */
10324/***/ (function(module, exports, __webpack_require__) {
10325
10326var getMapData = __webpack_require__(46);
10327
10328/**
10329 * Checks if a map value for `key` exists.
10330 *
10331 * @private
10332 * @name has
10333 * @memberOf MapCache
10334 * @param {string} key The key of the entry to check.
10335 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
10336 */
10337function mapCacheHas(key) {
10338  return getMapData(this, key).has(key);
10339}
10340
10341module.exports = mapCacheHas;
10342
10343
10344/***/ }),
10345/* 186 */
10346/***/ (function(module, exports, __webpack_require__) {
10347
10348var getMapData = __webpack_require__(46);
10349
10350/**
10351 * Sets the map `key` to `value`.
10352 *
10353 * @private
10354 * @name set
10355 * @memberOf MapCache
10356 * @param {string} key The key of the value to set.
10357 * @param {*} value The value to set.
10358 * @returns {Object} Returns the map cache instance.
10359 */
10360function mapCacheSet(key, value) {
10361  var data = getMapData(this, key),
10362      size = data.size;
10363
10364  data.set(key, value);
10365  this.size += data.size == size ? 0 : 1;
10366  return this;
10367}
10368
10369module.exports = mapCacheSet;
10370
10371
10372/***/ }),
10373/* 187 */
10374/***/ (function(module, exports, __webpack_require__) {
10375
10376var Stack = __webpack_require__(94),
10377    equalArrays = __webpack_require__(99),
10378    equalByTag = __webpack_require__(193),
10379    equalObjects = __webpack_require__(197),
10380    getTag = __webpack_require__(67),
10381    isArray = __webpack_require__(2),
10382    isBuffer = __webpack_require__(61),
10383    isTypedArray = __webpack_require__(63);
10384
10385/** Used to compose bitmasks for value comparisons. */
10386var COMPARE_PARTIAL_FLAG = 1;
10387
10388/** `Object#toString` result references. */
10389var argsTag = '[object Arguments]',
10390    arrayTag = '[object Array]',
10391    objectTag = '[object Object]';
10392
10393/** Used for built-in method references. */
10394var objectProto = Object.prototype;
10395
10396/** Used to check objects for own properties. */
10397var hasOwnProperty = objectProto.hasOwnProperty;
10398
10399/**
10400 * A specialized version of `baseIsEqual` for arrays and objects which performs
10401 * deep comparisons and tracks traversed objects enabling objects with circular
10402 * references to be compared.
10403 *
10404 * @private
10405 * @param {Object} object The object to compare.
10406 * @param {Object} other The other object to compare.
10407 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10408 * @param {Function} customizer The function to customize comparisons.
10409 * @param {Function} equalFunc The function to determine equivalents of values.
10410 * @param {Object} [stack] Tracks traversed `object` and `other` objects.
10411 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
10412 */
10413function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
10414  var objIsArr = isArray(object),
10415      othIsArr = isArray(other),
10416      objTag = objIsArr ? arrayTag : getTag(object),
10417      othTag = othIsArr ? arrayTag : getTag(other);
10418
10419  objTag = objTag == argsTag ? objectTag : objTag;
10420  othTag = othTag == argsTag ? objectTag : othTag;
10421
10422  var objIsObj = objTag == objectTag,
10423      othIsObj = othTag == objectTag,
10424      isSameTag = objTag == othTag;
10425
10426  if (isSameTag && isBuffer(object)) {
10427    if (!isBuffer(other)) {
10428      return false;
10429    }
10430    objIsArr = true;
10431    objIsObj = false;
10432  }
10433  if (isSameTag && !objIsObj) {
10434    stack || (stack = new Stack);
10435    return (objIsArr || isTypedArray(object))
10436      ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
10437      : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
10438  }
10439  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
10440    var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
10441        othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
10442
10443    if (objIsWrapped || othIsWrapped) {
10444      var objUnwrapped = objIsWrapped ? object.value() : object,
10445          othUnwrapped = othIsWrapped ? other.value() : other;
10446
10447      stack || (stack = new Stack);
10448      return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
10449    }
10450  }
10451  if (!isSameTag) {
10452    return false;
10453  }
10454  stack || (stack = new Stack);
10455  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
10456}
10457
10458module.exports = baseIsEqualDeep;
10459
10460
10461/***/ }),
10462/* 188 */
10463/***/ (function(module, exports, __webpack_require__) {
10464
10465var MapCache = __webpack_require__(59),
10466    setCacheAdd = __webpack_require__(189),
10467    setCacheHas = __webpack_require__(190);
10468
10469/**
10470 *
10471 * Creates an array cache object to store unique values.
10472 *
10473 * @private
10474 * @constructor
10475 * @param {Array} [values] The values to cache.
10476 */
10477function SetCache(values) {
10478  var index = -1,
10479      length = values == null ? 0 : values.length;
10480
10481  this.__data__ = new MapCache;
10482  while (++index < length) {
10483    this.add(values[index]);
10484  }
10485}
10486
10487// Add methods to `SetCache`.
10488SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
10489SetCache.prototype.has = setCacheHas;
10490
10491module.exports = SetCache;
10492
10493
10494/***/ }),
10495/* 189 */
10496/***/ (function(module, exports) {
10497
10498/** Used to stand-in for `undefined` hash values. */
10499var HASH_UNDEFINED = '__lodash_hash_undefined__';
10500
10501/**
10502 * Adds `value` to the array cache.
10503 *
10504 * @private
10505 * @name add
10506 * @memberOf SetCache
10507 * @alias push
10508 * @param {*} value The value to cache.
10509 * @returns {Object} Returns the cache instance.
10510 */
10511function setCacheAdd(value) {
10512  this.__data__.set(value, HASH_UNDEFINED);
10513  return this;
10514}
10515
10516module.exports = setCacheAdd;
10517
10518
10519/***/ }),
10520/* 190 */
10521/***/ (function(module, exports) {
10522
10523/**
10524 * Checks if `value` is in the array cache.
10525 *
10526 * @private
10527 * @name has
10528 * @memberOf SetCache
10529 * @param {*} value The value to search for.
10530 * @returns {number} Returns `true` if `value` is found, else `false`.
10531 */
10532function setCacheHas(value) {
10533  return this.__data__.has(value);
10534}
10535
10536module.exports = setCacheHas;
10537
10538
10539/***/ }),
10540/* 191 */
10541/***/ (function(module, exports) {
10542
10543/**
10544 * A specialized version of `_.some` for arrays without support for iteratee
10545 * shorthands.
10546 *
10547 * @private
10548 * @param {Array} [array] The array to iterate over.
10549 * @param {Function} predicate The function invoked per iteration.
10550 * @returns {boolean} Returns `true` if any element passes the predicate check,
10551 *  else `false`.
10552 */
10553function arraySome(array, predicate) {
10554  var index = -1,
10555      length = array == null ? 0 : array.length;
10556
10557  while (++index < length) {
10558    if (predicate(array[index], index, array)) {
10559      return true;
10560    }
10561  }
10562  return false;
10563}
10564
10565module.exports = arraySome;
10566
10567
10568/***/ }),
10569/* 192 */
10570/***/ (function(module, exports) {
10571
10572/**
10573 * Checks if a `cache` value for `key` exists.
10574 *
10575 * @private
10576 * @param {Object} cache The cache to query.
10577 * @param {string} key The key of the entry to check.
10578 * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
10579 */
10580function cacheHas(cache, key) {
10581  return cache.has(key);
10582}
10583
10584module.exports = cacheHas;
10585
10586
10587/***/ }),
10588/* 193 */
10589/***/ (function(module, exports, __webpack_require__) {
10590
10591var Symbol = __webpack_require__(32),
10592    Uint8Array = __webpack_require__(194),
10593    eq = __webpack_require__(57),
10594    equalArrays = __webpack_require__(99),
10595    mapToArray = __webpack_require__(195),
10596    setToArray = __webpack_require__(196);
10597
10598/** Used to compose bitmasks for value comparisons. */
10599var COMPARE_PARTIAL_FLAG = 1,
10600    COMPARE_UNORDERED_FLAG = 2;
10601
10602/** `Object#toString` result references. */
10603var boolTag = '[object Boolean]',
10604    dateTag = '[object Date]',
10605    errorTag = '[object Error]',
10606    mapTag = '[object Map]',
10607    numberTag = '[object Number]',
10608    regexpTag = '[object RegExp]',
10609    setTag = '[object Set]',
10610    stringTag = '[object String]',
10611    symbolTag = '[object Symbol]';
10612
10613var arrayBufferTag = '[object ArrayBuffer]',
10614    dataViewTag = '[object DataView]';
10615
10616/** Used to convert symbols to primitives and strings. */
10617var symbolProto = Symbol ? Symbol.prototype : undefined,
10618    symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
10619
10620/**
10621 * A specialized version of `baseIsEqualDeep` for comparing objects of
10622 * the same `toStringTag`.
10623 *
10624 * **Note:** This function only supports comparing values with tags of
10625 * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
10626 *
10627 * @private
10628 * @param {Object} object The object to compare.
10629 * @param {Object} other The other object to compare.
10630 * @param {string} tag The `toStringTag` of the objects to compare.
10631 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10632 * @param {Function} customizer The function to customize comparisons.
10633 * @param {Function} equalFunc The function to determine equivalents of values.
10634 * @param {Object} stack Tracks traversed `object` and `other` objects.
10635 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
10636 */
10637function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
10638  switch (tag) {
10639    case dataViewTag:
10640      if ((object.byteLength != other.byteLength) ||
10641          (object.byteOffset != other.byteOffset)) {
10642        return false;
10643      }
10644      object = object.buffer;
10645      other = other.buffer;
10646
10647    case arrayBufferTag:
10648      if ((object.byteLength != other.byteLength) ||
10649          !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
10650        return false;
10651      }
10652      return true;
10653
10654    case boolTag:
10655    case dateTag:
10656    case numberTag:
10657      // Coerce booleans to `1` or `0` and dates to milliseconds.
10658      // Invalid dates are coerced to `NaN`.
10659      return eq(+object, +other);
10660
10661    case errorTag:
10662      return object.name == other.name && object.message == other.message;
10663
10664    case regexpTag:
10665    case stringTag:
10666      // Coerce regexes to strings and treat strings, primitives and objects,
10667      // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
10668      // for more details.
10669      return object == (other + '');
10670
10671    case mapTag:
10672      var convert = mapToArray;
10673
10674    case setTag:
10675      var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
10676      convert || (convert = setToArray);
10677
10678      if (object.size != other.size && !isPartial) {
10679        return false;
10680      }
10681      // Assume cyclic values are equal.
10682      var stacked = stack.get(object);
10683      if (stacked) {
10684        return stacked == other;
10685      }
10686      bitmask |= COMPARE_UNORDERED_FLAG;
10687
10688      // Recursively compare objects (susceptible to call stack limits).
10689      stack.set(object, other);
10690      var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
10691      stack['delete'](object);
10692      return result;
10693
10694    case symbolTag:
10695      if (symbolValueOf) {
10696        return symbolValueOf.call(object) == symbolValueOf.call(other);
10697      }
10698  }
10699  return false;
10700}
10701
10702module.exports = equalByTag;
10703
10704
10705/***/ }),
10706/* 194 */
10707/***/ (function(module, exports, __webpack_require__) {
10708
10709var root = __webpack_require__(10);
10710
10711/** Built-in value references. */
10712var Uint8Array = root.Uint8Array;
10713
10714module.exports = Uint8Array;
10715
10716
10717/***/ }),
10718/* 195 */
10719/***/ (function(module, exports) {
10720
10721/**
10722 * Converts `map` to its key-value pairs.
10723 *
10724 * @private
10725 * @param {Object} map The map to convert.
10726 * @returns {Array} Returns the key-value pairs.
10727 */
10728function mapToArray(map) {
10729  var index = -1,
10730      result = Array(map.size);
10731
10732  map.forEach(function(value, key) {
10733    result[++index] = [key, value];
10734  });
10735  return result;
10736}
10737
10738module.exports = mapToArray;
10739
10740
10741/***/ }),
10742/* 196 */
10743/***/ (function(module, exports) {
10744
10745/**
10746 * Converts `set` to an array of its values.
10747 *
10748 * @private
10749 * @param {Object} set The set to convert.
10750 * @returns {Array} Returns the values.
10751 */
10752function setToArray(set) {
10753  var index = -1,
10754      result = Array(set.size);
10755
10756  set.forEach(function(value) {
10757    result[++index] = value;
10758  });
10759  return result;
10760}
10761
10762module.exports = setToArray;
10763
10764
10765/***/ }),
10766/* 197 */
10767/***/ (function(module, exports, __webpack_require__) {
10768
10769var getAllKeys = __webpack_require__(198);
10770
10771/** Used to compose bitmasks for value comparisons. */
10772var COMPARE_PARTIAL_FLAG = 1;
10773
10774/** Used for built-in method references. */
10775var objectProto = Object.prototype;
10776
10777/** Used to check objects for own properties. */
10778var hasOwnProperty = objectProto.hasOwnProperty;
10779
10780/**
10781 * A specialized version of `baseIsEqualDeep` for objects with support for
10782 * partial deep comparisons.
10783 *
10784 * @private
10785 * @param {Object} object The object to compare.
10786 * @param {Object} other The other object to compare.
10787 * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
10788 * @param {Function} customizer The function to customize comparisons.
10789 * @param {Function} equalFunc The function to determine equivalents of values.
10790 * @param {Object} stack Tracks traversed `object` and `other` objects.
10791 * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
10792 */
10793function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
10794  var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
10795      objProps = getAllKeys(object),
10796      objLength = objProps.length,
10797      othProps = getAllKeys(other),
10798      othLength = othProps.length;
10799
10800  if (objLength != othLength && !isPartial) {
10801    return false;
vendor: 1,075 bytes, lines 10802-10836
10802  }
10803  var index = objLength;
10804  while (index--) {
10805    var key = objProps[index];
10806    if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
10807      return false;
10808    }
10809  }
10810  // Check that cyclic values are equal.
10811  var objStacked = stack.get(object);
10812  var othStacked = stack.get(other);
10813  if (objStacked && othStacked) {
10814    return objStacked == other && othStacked == object;
10815  }
10816  var result = true;
10817  stack.set(object, other);
10818  stack.set(other, object);
10819
10820  var skipCtor = isPartial;
10821  while (++index < objLength) {
10822    key = objProps[index];
10823    var objValue = object[key],
10824        othValue = other[key];
10825
10826    if (customizer) {
10827      var compared = isPartial
10828        ? customizer(othValue, objValue, key, other, object, stack)
10829        : customizer(objValue, othValue, key, object, other, stack);
10830    }
10831    // Recursively compare objects (susceptible to call stack limits).
10832    if (!(compared === undefined
10833          ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
10834          : compared
10835        )) {
10836      result = false;
vendor: 10,630 bytes, lines 10837-11244
10837      break;
10838    }
10839    skipCtor || (skipCtor = key == 'constructor');
10840  }
10841  if (result && !skipCtor) {
10842    var objCtor = object.constructor,
10843        othCtor = other.constructor;
10844
10845    // Non `Object` object instances with different constructors are not equal.
10846    if (objCtor != othCtor &&
10847        ('constructor' in object && 'constructor' in other) &&
10848        !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
10849          typeof othCtor == 'function' && othCtor instanceof othCtor)) {
10850      result = false;
10851    }
10852  }
10853  stack['delete'](object);
10854  stack['delete'](other);
10855  return result;
10856}
10857
10858module.exports = equalObjects;
10859
10860
10861/***/ }),
10862/* 198 */
10863/***/ (function(module, exports, __webpack_require__) {
10864
10865var baseGetAllKeys = __webpack_require__(100),
10866    getSymbols = __webpack_require__(101),
10867    keys = __webpack_require__(47);
10868
10869/**
10870 * Creates an array of own enumerable property names and symbols of `object`.
10871 *
10872 * @private
10873 * @param {Object} object The object to query.
10874 * @returns {Array} Returns the array of property names and symbols.
10875 */
10876function getAllKeys(object) {
10877  return baseGetAllKeys(object, keys, getSymbols);
10878}
10879
10880module.exports = getAllKeys;
10881
10882
10883/***/ }),
10884/* 199 */
10885/***/ (function(module, exports) {
10886
10887/**
10888 * A specialized version of `_.filter` for arrays without support for
10889 * iteratee shorthands.
10890 *
10891 * @private
10892 * @param {Array} [array] The array to iterate over.
10893 * @param {Function} predicate The function invoked per iteration.
10894 * @returns {Array} Returns the new filtered array.
10895 */
10896function arrayFilter(array, predicate) {
10897  var index = -1,
10898      length = array == null ? 0 : array.length,
10899      resIndex = 0,
10900      result = [];
10901
10902  while (++index < length) {
10903    var value = array[index];
10904    if (predicate(value, index, array)) {
10905      result[resIndex++] = value;
10906    }
10907  }
10908  return result;
10909}
10910
10911module.exports = arrayFilter;
10912
10913
10914/***/ }),
10915/* 200 */
10916/***/ (function(module, exports) {
10917
10918/**
10919 * The base implementation of `_.times` without support for iteratee shorthands
10920 * or max array length checks.
10921 *
10922 * @private
10923 * @param {number} n The number of times to invoke `iteratee`.
10924 * @param {Function} iteratee The function invoked per iteration.
10925 * @returns {Array} Returns the array of results.
10926 */
10927function baseTimes(n, iteratee) {
10928  var index = -1,
10929      result = Array(n);
10930
10931  while (++index < n) {
10932    result[index] = iteratee(index);
10933  }
10934  return result;
10935}
10936
10937module.exports = baseTimes;
10938
10939
10940/***/ }),
10941/* 201 */
10942/***/ (function(module, exports, __webpack_require__) {
10943
10944var baseGetTag = __webpack_require__(24),
10945    isObjectLike = __webpack_require__(20);
10946
10947/** `Object#toString` result references. */
10948var argsTag = '[object Arguments]';
10949
10950/**
10951 * The base implementation of `_.isArguments`.
10952 *
10953 * @private
10954 * @param {*} value The value to check.
10955 * @returns {boolean} Returns `true` if `value` is an `arguments` object,
10956 */
10957function baseIsArguments(value) {
10958  return isObjectLike(value) && baseGetTag(value) == argsTag;
10959}
10960
10961module.exports = baseIsArguments;
10962
10963
10964/***/ }),
10965/* 202 */
10966/***/ (function(module, exports) {
10967
10968/**
10969 * This method returns `false`.
10970 *
10971 * @static
10972 * @memberOf _
10973 * @since 4.13.0
10974 * @category Util
10975 * @returns {boolean} Returns `false`.
10976 * @example
10977 *
10978 * _.times(2, _.stubFalse);
10979 * // => [false, false]
10980 */
10981function stubFalse() {
10982  return false;
10983}
10984
10985module.exports = stubFalse;
10986
10987
10988/***/ }),
10989/* 203 */
10990/***/ (function(module, exports, __webpack_require__) {
10991
10992var baseGetTag = __webpack_require__(24),
10993    isLength = __webpack_require__(64),
10994    isObjectLike = __webpack_require__(20);
10995
10996/** `Object#toString` result references. */
10997var argsTag = '[object Arguments]',
10998    arrayTag = '[object Array]',
10999    boolTag = '[object Boolean]',
11000    dateTag = '[object Date]',
11001    errorTag = '[object Error]',
11002    funcTag = '[object Function]',
11003    mapTag = '[object Map]',
11004    numberTag = '[object Number]',
11005    objectTag = '[object Object]',
11006    regexpTag = '[object RegExp]',
11007    setTag = '[object Set]',
11008    stringTag = '[object String]',
11009    weakMapTag = '[object WeakMap]';
11010
11011var arrayBufferTag = '[object ArrayBuffer]',
11012    dataViewTag = '[object DataView]',
11013    float32Tag = '[object Float32Array]',
11014    float64Tag = '[object Float64Array]',
11015    int8Tag = '[object Int8Array]',
11016    int16Tag = '[object Int16Array]',
11017    int32Tag = '[object Int32Array]',
11018    uint8Tag = '[object Uint8Array]',
11019    uint8ClampedTag = '[object Uint8ClampedArray]',
11020    uint16Tag = '[object Uint16Array]',
11021    uint32Tag = '[object Uint32Array]';
11022
11023/** Used to identify `toStringTag` values of typed arrays. */
11024var typedArrayTags = {};
11025typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
11026typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
11027typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
11028typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
11029typedArrayTags[uint32Tag] = true;
11030typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
11031typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
11032typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
11033typedArrayTags[errorTag] = typedArrayTags[funcTag] =
11034typedArrayTags[mapTag] = typedArrayTags[numberTag] =
11035typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
11036typedArrayTags[setTag] = typedArrayTags[stringTag] =
11037typedArrayTags[weakMapTag] = false;
11038
11039/**
11040 * The base implementation of `_.isTypedArray` without Node.js optimizations.
11041 *
11042 * @private
11043 * @param {*} value The value to check.
11044 * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
11045 */
11046function baseIsTypedArray(value) {
11047  return isObjectLike(value) &&
11048    isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
11049}
11050
11051module.exports = baseIsTypedArray;
11052
11053
11054/***/ }),
11055/* 204 */
11056/***/ (function(module, exports) {
11057
11058/**
11059 * The base implementation of `_.unary` without support for storing metadata.
11060 *
11061 * @private
11062 * @param {Function} func The function to cap arguments for.
11063 * @returns {Function} Returns the new capped function.
11064 */
11065function baseUnary(func) {
11066  return function(value) {
11067    return func(value);
11068  };
11069}
11070
11071module.exports = baseUnary;
11072
11073
11074/***/ }),
11075/* 205 */
11076/***/ (function(module, exports, __webpack_require__) {
11077
11078/* WEBPACK VAR INJECTION */(function(module) {var freeGlobal = __webpack_require__(96);
11079
11080/** Detect free variable `exports`. */
11081var freeExports =  true && exports && !exports.nodeType && exports;
11082
11083/** Detect free variable `module`. */
11084var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
11085
11086/** Detect the popular CommonJS extension `module.exports`. */
11087var moduleExports = freeModule && freeModule.exports === freeExports;
11088
11089/** Detect free variable `process` from Node.js. */
11090var freeProcess = moduleExports && freeGlobal.process;
11091
11092/** Used to access faster Node.js helpers. */
11093var nodeUtil = (function() {
11094  try {
11095    // Use `util.types` for Node.js 10+.
11096    var types = freeModule && freeModule.require && freeModule.require('util').types;
11097
11098    if (types) {
11099      return types;
11100    }
11101
11102    // Legacy `process.binding('util')` for Node.js < 10.
11103    return freeProcess && freeProcess.binding && freeProcess.binding('util');
11104  } catch (e) {}
11105}());
11106
11107module.exports = nodeUtil;
11108
11109/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(104)(module)))
11110
11111/***/ }),
11112/* 206 */
11113/***/ (function(module, exports, __webpack_require__) {
11114
11115var overArg = __webpack_require__(105);
11116
11117/* Built-in method references for those with the same name as other `lodash` methods. */
11118var nativeKeys = overArg(Object.keys, Object);
11119
11120module.exports = nativeKeys;
11121
11122
11123/***/ }),
11124/* 207 */
11125/***/ (function(module, exports, __webpack_require__) {
11126
11127var getNative = __webpack_require__(19),
11128    root = __webpack_require__(10);
11129
11130/* Built-in method references that are verified to be native. */
11131var DataView = getNative(root, 'DataView');
11132
11133module.exports = DataView;
11134
11135
11136/***/ }),
11137/* 208 */
11138/***/ (function(module, exports, __webpack_require__) {
11139
11140var getNative = __webpack_require__(19),
11141    root = __webpack_require__(10);
11142
11143/* Built-in method references that are verified to be native. */
11144var Promise = getNative(root, 'Promise');
11145
11146module.exports = Promise;
11147
11148
11149/***/ }),
11150/* 209 */
11151/***/ (function(module, exports, __webpack_require__) {
11152
11153var getNative = __webpack_require__(19),
11154    root = __webpack_require__(10);
11155
11156/* Built-in method references that are verified to be native. */
11157var Set = getNative(root, 'Set');
11158
11159module.exports = Set;
11160
11161
11162/***/ }),
11163/* 210 */
11164/***/ (function(module, exports, __webpack_require__) {
11165
11166var isStrictComparable = __webpack_require__(107),
11167    keys = __webpack_require__(47);
11168
11169/**
11170 * Gets the property names, values, and compare flags of `object`.
11171 *
11172 * @private
11173 * @param {Object} object The object to query.
11174 * @returns {Array} Returns the match data of `object`.
11175 */
11176function getMatchData(object) {
11177  var result = keys(object),
11178      length = result.length;
11179
11180  while (length--) {
11181    var key = result[length],
11182        value = object[key];
11183
11184    result[length] = [key, value, isStrictComparable(value)];
11185  }
11186  return result;
11187}
11188
11189module.exports = getMatchData;
11190
11191
11192/***/ }),
11193/* 211 */
11194/***/ (function(module, exports, __webpack_require__) {
11195
11196var baseIsEqual = __webpack_require__(98),
11197    get = __webpack_require__(68),
11198    hasIn = __webpack_require__(217),
11199    isKey = __webpack_require__(70),
11200    isStrictComparable = __webpack_require__(107),
11201    matchesStrictComparable = __webpack_require__(108),
11202    toKey = __webpack_require__(33);
11203
11204/** Used to compose bitmasks for value comparisons. */
11205var COMPARE_PARTIAL_FLAG = 1,
11206    COMPARE_UNORDERED_FLAG = 2;
11207
11208/**
11209 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
11210 *
11211 * @private
11212 * @param {string} path The path of the property to get.
11213 * @param {*} srcValue The value to match.
11214 * @returns {Function} Returns the new spec function.
11215 */
11216function baseMatchesProperty(path, srcValue) {
11217  if (isKey(path) && isStrictComparable(srcValue)) {
11218    return matchesStrictComparable(toKey(path), srcValue);
11219  }
11220  return function(object) {
11221    var objValue = get(object, path);
11222    return (objValue === undefined && objValue === srcValue)
11223      ? hasIn(object, path)
11224      : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
11225  };
11226}
11227
11228module.exports = baseMatchesProperty;
11229
11230
11231/***/ }),
11232/* 212 */
11233/***/ (function(module, exports, __webpack_require__) {
11234
11235var memoizeCapped = __webpack_require__(213);
11236
11237/** Used to match property names within property paths. */
11238var rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
11239
11240/** Used to match backslashes in property paths. */
11241var reEscapeChar = /\\(\\)?/g;
11242
11243/**
11244 * Converts `string` to a property path array.
vendor: 5,053 bytes, lines 11245-11438
11245 *
11246 * @private
11247 * @param {string} string The string to convert.
11248 * @returns {Array} Returns the property path array.
11249 */
11250var stringToPath = memoizeCapped(function(string) {
11251  var result = [];
11252  if (string.charCodeAt(0) === 46 /* . */) {
11253    result.push('');
11254  }
11255  string.replace(rePropName, function(match, number, quote, subString) {
11256    result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
11257  });
11258  return result;
11259});
11260
11261module.exports = stringToPath;
11262
11263
11264/***/ }),
11265/* 213 */
11266/***/ (function(module, exports, __webpack_require__) {
11267
11268var memoize = __webpack_require__(214);
11269
11270/** Used as the maximum memoize cache size. */
11271var MAX_MEMOIZE_SIZE = 500;
11272
11273/**
11274 * A specialized version of `_.memoize` which clears the memoized function's
11275 * cache when it exceeds `MAX_MEMOIZE_SIZE`.
11276 *
11277 * @private
11278 * @param {Function} func The function to have its output memoized.
11279 * @returns {Function} Returns the new memoized function.
11280 */
11281function memoizeCapped(func) {
11282  var result = memoize(func, function(key) {
11283    if (cache.size === MAX_MEMOIZE_SIZE) {
11284      cache.clear();
11285    }
11286    return key;
11287  });
11288
11289  var cache = result.cache;
11290  return result;
11291}
11292
11293module.exports = memoizeCapped;
11294
11295
11296/***/ }),
11297/* 214 */
11298/***/ (function(module, exports, __webpack_require__) {
11299
11300var MapCache = __webpack_require__(59);
11301
11302/** Error message constants. */
11303var FUNC_ERROR_TEXT = 'Expected a function';
11304
11305/**
11306 * Creates a function that memoizes the result of `func`. If `resolver` is
11307 * provided, it determines the cache key for storing the result based on the
11308 * arguments provided to the memoized function. By default, the first argument
11309 * provided to the memoized function is used as the map cache key. The `func`
11310 * is invoked with the `this` binding of the memoized function.
11311 *
11312 * **Note:** The cache is exposed as the `cache` property on the memoized
11313 * function. Its creation may be customized by replacing the `_.memoize.Cache`
11314 * constructor with one whose instances implement the
11315 * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
11316 * method interface of `clear`, `delete`, `get`, `has`, and `set`.
11317 *
11318 * @static
11319 * @memberOf _
11320 * @since 0.1.0
11321 * @category Function
11322 * @param {Function} func The function to have its output memoized.
11323 * @param {Function} [resolver] The function to resolve the cache key.
11324 * @returns {Function} Returns the new memoized function.
11325 * @example
11326 *
11327 * var object = { 'a': 1, 'b': 2 };
11328 * var other = { 'c': 3, 'd': 4 };
11329 *
11330 * var values = _.memoize(_.values);
11331 * values(object);
11332 * // => [1, 2]
11333 *
11334 * values(other);
11335 * // => [3, 4]
11336 *
11337 * object.a = 2;
11338 * values(object);
11339 * // => [1, 2]
11340 *
11341 * // Modify the result cache.
11342 * values.cache.set(object, ['a', 'b']);
11343 * values(object);
11344 * // => ['a', 'b']
11345 *
11346 * // Replace `_.memoize.Cache`.
11347 * _.memoize.Cache = WeakMap;
11348 */
11349function memoize(func, resolver) {
11350  if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
11351    throw new TypeError(FUNC_ERROR_TEXT);
11352  }
11353  var memoized = function() {
11354    var args = arguments,
11355        key = resolver ? resolver.apply(this, args) : args[0],
11356        cache = memoized.cache;
11357
11358    if (cache.has(key)) {
11359      return cache.get(key);
11360    }
11361    var result = func.apply(this, args);
11362    memoized.cache = cache.set(key, result) || cache;
11363    return result;
11364  };
11365  memoized.cache = new (memoize.Cache || MapCache);
11366  return memoized;
11367}
11368
11369// Expose `MapCache`.
11370memoize.Cache = MapCache;
11371
11372module.exports = memoize;
11373
11374
11375/***/ }),
11376/* 215 */
11377/***/ (function(module, exports, __webpack_require__) {
11378
11379var baseToString = __webpack_require__(216);
11380
11381/**
11382 * Converts `value` to a string. An empty string is returned for `null`
11383 * and `undefined` values. The sign of `-0` is preserved.
11384 *
11385 * @static
11386 * @memberOf _
11387 * @since 4.0.0
11388 * @category Lang
11389 * @param {*} value The value to convert.
11390 * @returns {string} Returns the converted string.
11391 * @example
11392 *
11393 * _.toString(null);
11394 * // => ''
11395 *
11396 * _.toString(-0);
11397 * // => '-0'
11398 *
11399 * _.toString([1, 2, 3]);
11400 * // => '1,2,3'
11401 */
11402function toString(value) {
11403  return value == null ? '' : baseToString(value);
11404}
11405
11406module.exports = toString;
11407
11408
11409/***/ }),
11410/* 216 */
11411/***/ (function(module, exports, __webpack_require__) {
11412
11413var Symbol = __webpack_require__(32),
11414    arrayMap = __webpack_require__(109),
11415    isArray = __webpack_require__(2),
11416    isSymbol = __webpack_require__(50);
11417
11418/** Used as references for various `Number` constants. */
11419var INFINITY = 1 / 0;
11420
11421/** Used to convert symbols to primitives and strings. */
11422var symbolProto = Symbol ? Symbol.prototype : undefined,
11423    symbolToString = symbolProto ? symbolProto.toString : undefined;
11424
11425/**
11426 * The base implementation of `_.toString` which doesn't convert nullish
11427 * values to empty strings.
11428 *
11429 * @private
11430 * @param {*} value The value to process.
11431 * @returns {string} Returns the string.
11432 */
11433function baseToString(value) {
11434  // Exit early for strings to avoid a performance hit in some environments.
11435  if (typeof value == 'string') {
11436    return value;
11437  }
11438  if (isArray(value)) {
vendor: 2,364 bytes, lines 11439-11536
11439    // Recursively convert values (susceptible to call stack limits).
11440    return arrayMap(value, baseToString) + '';
11441  }
11442  if (isSymbol(value)) {
11443    return symbolToString ? symbolToString.call(value) : '';
11444  }
11445  var result = (value + '');
11446  return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
11447}
11448
11449module.exports = baseToString;
11450
11451
11452/***/ }),
11453/* 217 */
11454/***/ (function(module, exports, __webpack_require__) {
11455
11456var baseHasIn = __webpack_require__(218),
11457    hasPath = __webpack_require__(219);
11458
11459/**
11460 * Checks if `path` is a direct or inherited property of `object`.
11461 *
11462 * @static
11463 * @memberOf _
11464 * @since 4.0.0
11465 * @category Object
11466 * @param {Object} object The object to query.
11467 * @param {Array|string} path The path to check.
11468 * @returns {boolean} Returns `true` if `path` exists, else `false`.
11469 * @example
11470 *
11471 * var object = _.create({ 'a': _.create({ 'b': 2 }) });
11472 *
11473 * _.hasIn(object, 'a');
11474 * // => true
11475 *
11476 * _.hasIn(object, 'a.b');
11477 * // => true
11478 *
11479 * _.hasIn(object, ['a', 'b']);
11480 * // => true
11481 *
11482 * _.hasIn(object, 'b');
11483 * // => false
11484 */
11485function hasIn(object, path) {
11486  return object != null && hasPath(object, path, baseHasIn);
11487}
11488
11489module.exports = hasIn;
11490
11491
11492/***/ }),
11493/* 218 */
11494/***/ (function(module, exports) {
11495
11496/**
11497 * The base implementation of `_.hasIn` without support for deep paths.
11498 *
11499 * @private
11500 * @param {Object} [object] The object to query.
11501 * @param {Array|string} key The key to check.
11502 * @returns {boolean} Returns `true` if `key` exists, else `false`.
11503 */
11504function baseHasIn(object, key) {
11505  return object != null && key in Object(object);
11506}
11507
11508module.exports = baseHasIn;
11509
11510
11511/***/ }),
11512/* 219 */
11513/***/ (function(module, exports, __webpack_require__) {
11514
11515var castPath = __webpack_require__(49),
11516    isArguments = __webpack_require__(48),
11517    isArray = __webpack_require__(2),
11518    isIndex = __webpack_require__(62),
11519    isLength = __webpack_require__(64),
11520    toKey = __webpack_require__(33);
11521
11522/**
11523 * Checks if `path` exists on `object`.
11524 *
11525 * @private
11526 * @param {Object} object The object to query.
11527 * @param {Array|string} path The path to check.
11528 * @param {Function} hasFunc The function to check properties.
11529 * @returns {boolean} Returns `true` if `path` exists, else `false`.
11530 */
11531function hasPath(object, path, hasFunc) {
11532  path = castPath(path, object);
11533
11534  var index = -1,
11535      length = path.length,
11536      result = false;
11537
11538  while (++index < length) {
11539    var key = toKey(path[index]);
11540    if (!(result = object != null && hasFunc(object, key))) {
11541      break;
11542    }
11543    object = object[key];
11544  }
11545  if (result || ++index != length) {
11546    return result;
11547  }
11548  length = object == null ? 0 : object.length;
11549  return !!length && isLength(length) && isIndex(key, length) &&
11550    (isArray(object) || isArguments(object));
11551}
11552
11553module.exports = hasPath;
11554
11555
11556/***/ }),
11557/* 220 */
11558/***/ (function(module, exports, __webpack_require__) {
11559
11560var baseProperty = __webpack_require__(110),
11561    basePropertyDeep = __webpack_require__(221),
11562    isKey = __webpack_require__(70),
11563    toKey = __webpack_require__(33);
11564
11565/**
11566 * Creates a function that returns the value at `path` of a given object.
11567 *
11568 * @static
11569 * @memberOf _
11570 * @since 2.4.0
11571 * @category Util
11572 * @param {Array|string} path The path of the property to get.
11573 * @returns {Function} Returns the new accessor function.
11574 * @example
11575 *
11576 * var objects = [
11577 *   { 'a': { 'b': 2 } },
11578 *   { 'a': { 'b': 1 } }
11579 * ];
11580 *
11581 * _.map(objects, _.property('a.b'));
11582 * // => [2, 1]
11583 *
11584 * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
11585 * // => [1, 2]
11586 */
11587function property(path) {
11588  return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
11589}
11590
11591module.exports = property;
11592
11593
11594/***/ }),
11595/* 221 */
11596/***/ (function(module, exports, __webpack_require__) {
11597
11598var baseGet = __webpack_require__(69);
11599
11600/**
11601 * A specialized version of `baseProperty` which supports deep paths.
11602 *
11603 * @private
11604 * @param {Array|string} path The path of the property to get.
11605 * @returns {Function} Returns the new accessor function.
11606 */
11607function basePropertyDeep(path) {
11608  return function(object) {
11609    return baseGet(object, path);
11610  };
11611}
11612
11613module.exports = basePropertyDeep;
11614
11615
11616/***/ }),
11617/* 222 */
11618/***/ (function(module, exports, __webpack_require__) {
11619
11620var toNumber = __webpack_require__(72);
11621
11622/** Used as references for various `Number` constants. */
11623var INFINITY = 1 / 0,
11624    MAX_INTEGER = 1.7976931348623157e+308;
11625
11626/**
11627 * Converts `value` to a finite number.
11628 *
11629 * @static
11630 * @memberOf _
11631 * @since 4.12.0
11632 * @category Lang
11633 * @param {*} value The value to convert.
11634 * @returns {number} Returns the converted number.
11635 * @example
11636 *
11637 * _.toFinite(3.2);
11638 * // => 3.2
11639 *
11640 * _.toFinite(Number.MIN_VALUE);
11641 * // => 5e-324
11642 *
11643 * _.toFinite(Infinity);
11644 * // => 1.7976931348623157e+308
11645 *
11646 * _.toFinite('3.2');
11647 * // => 3.2
11648 */
11649function toFinite(value) {
11650  if (!value) {
11651    return value === 0 ? value : 0;
11652  }
11653  value = toNumber(value);
11654  if (value === INFINITY || value === -INFINITY) {
11655    var sign = (value < 0 ? -1 : 1);
11656    return sign * MAX_INTEGER;
11657  }
11658  return value === value ? value : 0;
11659}
11660
11661module.exports = toFinite;
11662
11663
11664/***/ }),
11665/* 223 */
11666/***/ (function(module, exports, __webpack_require__) {
11667
11668var trimmedEndIndex = __webpack_require__(224);
11669
11670/** Used to match leading whitespace. */
11671var reTrimStart = /^\s+/;
11672
11673/**
11674 * The base implementation of `_.trim`.
11675 *
11676 * @private
11677 * @param {string} string The string to trim.
11678 * @returns {string} Returns the trimmed string.
11679 */
11680function baseTrim(string) {
11681  return string
11682    ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
11683    : string;
11684}
11685
11686module.exports = baseTrim;
11687
11688
11689/***/ }),
11690/* 224 */
11691/***/ (function(module, exports) {
11692
11693/** Used to match a single whitespace character. */
11694var reWhitespace = /\s/;
11695
11696/**
11697 * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
11698 * character of `string`.
11699 *
11700 * @private
11701 * @param {string} string The string to inspect.
11702 * @returns {number} Returns the index of the last non-whitespace character.
11703 */
11704function trimmedEndIndex(string) {
11705  var index = string.length;
11706
11707  while (index-- && reWhitespace.test(string.charAt(index))) {}
11708  return index;
11709}
11710
11711module.exports = trimmedEndIndex;
11712
11713
11714/***/ }),
11715/* 225 */
11716/***/ (function(module, exports, __webpack_require__) {
11717
11718module.exports = __webpack_require__(226);
11719
11720__webpack_require__(283);
11721__webpack_require__(284);
11722
11723
11724/***/ }),
11725/* 226 */
11726/***/ (function(module, exports, __webpack_require__) {
11727
11728__webpack_require__(227);
11729__webpack_require__(244);
11730__webpack_require__(251);
11731__webpack_require__(252);
11732__webpack_require__(253);
11733__webpack_require__(254);
11734__webpack_require__(256);
11735__webpack_require__(257);
11736__webpack_require__(259);
11737__webpack_require__(260);
11738__webpack_require__(261);
11739__webpack_require__(262);
11740__webpack_require__(263);
11741__webpack_require__(264);
11742__webpack_require__(126);
11743__webpack_require__(266);
11744__webpack_require__(267);
11745__webpack_require__(268);
11746__webpack_require__(269);
11747__webpack_require__(271);
11748__webpack_require__(272);
11749__webpack_require__(273);
11750__webpack_require__(274);
11751__webpack_require__(275);
11752__webpack_require__(276);
11753__webpack_require__(277);
11754__webpack_require__(278);
11755__webpack_require__(280);
11756__webpack_require__(281);
11757__webpack_require__(282);
11758var path = __webpack_require__(119);
11759
11760module.exports = path.Array;
11761
11762
11763/***/ }),
11764/* 227 */
11765/***/ (function(module, exports, __webpack_require__) {
11766
11767"use strict";
11768
11769var charAt = __webpack_require__(228).charAt;
11770var InternalStateModule = __webpack_require__(74);
11771var defineIterator = __webpack_require__(116);
11772
11773var STRING_ITERATOR = 'String Iterator';
11774var setInternalState = InternalStateModule.set;
11775var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
11776
11777// `String.prototype[@@iterator]` method
11778// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
11779defineIterator(String, 'String', function (iterated) {
11780  setInternalState(this, {
11781    type: STRING_ITERATOR,
11782    string: String(iterated),
11783    index: 0
11784  });
11785// `%StringIteratorPrototype%.next` method
11786// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
11787}, function next() {
11788  var state = getInternalState(this);
11789  var string = state.string;
11790  var index = state.index;
11791  var point;
11792  if (index >= string.length) return { value: undefined, done: true };
11793  point = charAt(string, index);
11794  state.index += point.length;
11795  return { value: point, done: false };
11796});
11797
11798
11799/***/ }),
11800/* 228 */
11801/***/ (function(module, exports, __webpack_require__) {
11802
11803var toInteger = __webpack_require__(26);
11804var requireObjectCoercible = __webpack_require__(73);
11805
11806// `String.prototype.{ codePointAt, at }` methods implementation
11807var createMethod = function (CONVERT_TO_STRING) {
11808  return function ($this, pos) {
11809    var S = String(requireObjectCoercible($this));
11810    var position = toInteger(pos);
11811    var size = S.length;
11812    var first, second;
11813    if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
vendor: 7,094 bytes, lines 11814-12057
11814    first = S.charCodeAt(position);
11815    return first < 0xD800 || first > 0xDBFF || position + 1 === size
11816      || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
11817        ? CONVERT_TO_STRING ? S.charAt(position) : first
11818        : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
11819  };
11820};
11821
11822module.exports = {
11823  // `String.prototype.codePointAt` method
11824  // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
11825  codeAt: createMethod(false),
11826  // `String.prototype.at` method
11827  // https://github.com/mathiasbynens/String.prototype.at
11828  charAt: createMethod(true)
11829};
11830
11831
11832/***/ }),
11833/* 229 */
11834/***/ (function(module, exports, __webpack_require__) {
11835
11836var global = __webpack_require__(7);
11837var nativeFunctionToString = __webpack_require__(112);
11838
11839var WeakMap = global.WeakMap;
11840
11841module.exports = typeof WeakMap === 'function' && /native code/.test(nativeFunctionToString.call(WeakMap));
11842
11843
11844/***/ }),
11845/* 230 */
11846/***/ (function(module, exports, __webpack_require__) {
11847
11848"use strict";
11849
11850var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
11851var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
11852
11853// Nashorn ~ JDK8 bug
11854var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
11855
11856// `Object.prototype.propertyIsEnumerable` method implementation
11857// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
11858exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
11859  var descriptor = getOwnPropertyDescriptor(this, V);
11860  return !!descriptor && descriptor.enumerable;
11861} : nativePropertyIsEnumerable;
11862
11863
11864/***/ }),
11865/* 231 */
11866/***/ (function(module, exports, __webpack_require__) {
11867
11868var has = __webpack_require__(17);
11869var ownKeys = __webpack_require__(232);
11870var getOwnPropertyDescriptorModule = __webpack_require__(117);
11871var definePropertyModule = __webpack_require__(15);
11872
11873module.exports = function (target, source) {
11874  var keys = ownKeys(source);
11875  var defineProperty = definePropertyModule.f;
11876  var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
11877  for (var i = 0; i < keys.length; i++) {
11878    var key = keys[i];
11879    if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
11880  }
11881};
11882
11883
11884/***/ }),
11885/* 232 */
11886/***/ (function(module, exports, __webpack_require__) {
11887
11888var getBuiltIn = __webpack_require__(81);
11889var getOwnPropertyNamesModule = __webpack_require__(233);
11890var getOwnPropertySymbolsModule = __webpack_require__(234);
11891var anObject = __webpack_require__(27);
11892
11893// all object keys, includes non-enumerable and symbols
11894module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
11895  var keys = getOwnPropertyNamesModule.f(anObject(it));
11896  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
11897  return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
11898};
11899
11900
11901/***/ }),
11902/* 233 */
11903/***/ (function(module, exports, __webpack_require__) {
11904
11905var internalObjectKeys = __webpack_require__(120);
11906var enumBugKeys = __webpack_require__(83);
11907
11908var hiddenKeys = enumBugKeys.concat('length', 'prototype');
11909
11910// `Object.getOwnPropertyNames` method
11911// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
11912exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
11913  return internalObjectKeys(O, hiddenKeys);
11914};
11915
11916
11917/***/ }),
11918/* 234 */
11919/***/ (function(module, exports) {
11920
11921exports.f = Object.getOwnPropertySymbols;
11922
11923
11924/***/ }),
11925/* 235 */
11926/***/ (function(module, exports, __webpack_require__) {
11927
11928var fails = __webpack_require__(8);
11929
11930var replacement = /#|\.prototype\./;
11931
11932var isForced = function (feature, detection) {
11933  var value = data[normalize(feature)];
11934  return value == POLYFILL ? true
11935    : value == NATIVE ? false
11936    : typeof detection == 'function' ? fails(detection)
11937    : !!detection;
11938};
11939
11940var normalize = isForced.normalize = function (string) {
11941  return String(string).replace(replacement, '.').toLowerCase();
11942};
11943
11944var data = isForced.data = {};
11945var NATIVE = isForced.NATIVE = 'N';
11946var POLYFILL = isForced.POLYFILL = 'P';
11947
11948module.exports = isForced;
11949
11950
11951/***/ }),
11952/* 236 */
11953/***/ (function(module, exports, __webpack_require__) {
11954
11955"use strict";
11956
11957var IteratorPrototype = __webpack_require__(121).IteratorPrototype;
11958var create = __webpack_require__(123);
11959var createPropertyDescriptor = __webpack_require__(52);
11960var setToStringTag = __webpack_require__(124);
11961var Iterators = __webpack_require__(35);
11962
11963var returnThis = function () { return this; };
11964
11965module.exports = function (IteratorConstructor, NAME, next) {
11966  var TO_STRING_TAG = NAME + ' Iterator';
11967  IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
11968  setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
11969  Iterators[TO_STRING_TAG] = returnThis;
11970  return IteratorConstructor;
11971};
11972
11973
11974/***/ }),
11975/* 237 */
11976/***/ (function(module, exports, __webpack_require__) {
11977
11978var fails = __webpack_require__(8);
11979
11980module.exports = !fails(function () {
11981  function F() { /* empty */ }
11982  F.prototype.constructor = null;
11983  return Object.getPrototypeOf(new F()) !== F.prototype;
11984});
11985
11986
11987/***/ }),
11988/* 238 */
11989/***/ (function(module, exports, __webpack_require__) {
11990
11991var fails = __webpack_require__(8);
11992
11993module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
11994  // Chrome 38 Symbol has incorrect toString conversion
11995  // eslint-disable-next-line no-undef
11996  return !String(Symbol());
11997});
11998
11999
12000/***/ }),
12001/* 239 */
12002/***/ (function(module, exports, __webpack_require__) {
12003
12004var DESCRIPTORS = __webpack_require__(14);
12005var definePropertyModule = __webpack_require__(15);
12006var anObject = __webpack_require__(27);
12007var objectKeys = __webpack_require__(240);
12008
12009// `Object.defineProperties` method
12010// https://tc39.github.io/ecma262/#sec-object.defineproperties
12011module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
12012  anObject(O);
12013  var keys = objectKeys(Properties);
12014  var length = keys.length;
12015  var index = 0;
12016  var key;
12017  while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
12018  return O;
12019};
12020
12021
12022/***/ }),
12023/* 240 */
12024/***/ (function(module, exports, __webpack_require__) {
12025
12026var internalObjectKeys = __webpack_require__(120);
12027var enumBugKeys = __webpack_require__(83);
12028
12029// `Object.keys` method
12030// https://tc39.github.io/ecma262/#sec-object.keys
12031module.exports = Object.keys || function keys(O) {
12032  return internalObjectKeys(O, enumBugKeys);
12033};
12034
12035
12036/***/ }),
12037/* 241 */
12038/***/ (function(module, exports, __webpack_require__) {
12039
12040var getBuiltIn = __webpack_require__(81);
12041
12042module.exports = getBuiltIn('document', 'documentElement');
12043
12044
12045/***/ }),
12046/* 242 */
12047/***/ (function(module, exports, __webpack_require__) {
12048
12049var anObject = __webpack_require__(27);
12050var aPossiblePrototype = __webpack_require__(243);
12051
12052// `Object.setPrototypeOf` method
12053// https://tc39.github.io/ecma262/#sec-object.setprototypeof
12054// Works with __proto__ only. Old v8 can't work with null proto objects.
12055/* eslint-disable no-proto */
12056module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
12057  var CORRECT_SETTER = false;
vendor: 4,811 bytes, lines 12058-12227
12058  var test = {};
12059  var setter;
12060  try {
12061    setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
12062    setter.call(test, []);
12063    CORRECT_SETTER = test instanceof Array;
12064  } catch (error) { /* empty */ }
12065  return function setPrototypeOf(O, proto) {
12066    anObject(O);
12067    aPossiblePrototype(proto);
12068    if (CORRECT_SETTER) setter.call(O, proto);
12069    else O.__proto__ = proto;
12070    return O;
12071  };
12072}() : undefined);
12073
12074
12075/***/ }),
12076/* 243 */
12077/***/ (function(module, exports, __webpack_require__) {
12078
12079var isObject = __webpack_require__(16);
12080
12081module.exports = function (it) {
12082  if (!isObject(it) && it !== null) {
12083    throw TypeError("Can't set " + String(it) + ' as a prototype');
12084  } return it;
12085};
12086
12087
12088/***/ }),
12089/* 244 */
12090/***/ (function(module, exports, __webpack_require__) {
12091
12092var $ = __webpack_require__(0);
12093var from = __webpack_require__(245);
12094var checkCorrectnessOfIteration = __webpack_require__(250);
12095
12096var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
12097  Array.from(iterable);
12098});
12099
12100// `Array.from` method
12101// https://tc39.github.io/ecma262/#sec-array.from
12102$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
12103  from: from
12104});
12105
12106
12107/***/ }),
12108/* 245 */
12109/***/ (function(module, exports, __webpack_require__) {
12110
12111"use strict";
12112
12113var bind = __webpack_require__(54);
12114var toObject = __webpack_require__(4);
12115var callWithSafeIterationClosing = __webpack_require__(246);
12116var isArrayIteratorMethod = __webpack_require__(247);
12117var toLength = __webpack_require__(3);
12118var createProperty = __webpack_require__(36);
12119var getIteratorMethod = __webpack_require__(248);
12120
12121// `Array.from` method implementation
12122// https://tc39.github.io/ecma262/#sec-array.from
12123module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
12124  var O = toObject(arrayLike);
12125  var C = typeof this == 'function' ? this : Array;
12126  var argumentsLength = arguments.length;
12127  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
12128  var mapping = mapfn !== undefined;
12129  var index = 0;
12130  var iteratorMethod = getIteratorMethod(O);
12131  var length, result, step, iterator;
12132  if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
12133  // if the target is not iterable or it's an array with the default iterator - use a simple case
12134  if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
12135    iterator = iteratorMethod.call(O);
12136    result = new C();
12137    for (;!(step = iterator.next()).done; index++) {
12138      createProperty(result, index, mapping
12139        ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true)
12140        : step.value
12141      );
12142    }
12143  } else {
12144    length = toLength(O.length);
12145    result = new C(length);
12146    for (;length > index; index++) {
12147      createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]);
12148    }
12149  }
12150  result.length = index;
12151  return result;
12152};
12153
12154
12155/***/ }),
12156/* 246 */
12157/***/ (function(module, exports, __webpack_require__) {
12158
12159var anObject = __webpack_require__(27);
12160
12161// call something on iterator step with safe closing on error
12162module.exports = function (iterator, fn, value, ENTRIES) {
12163  try {
12164    return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
12165  // 7.4.6 IteratorClose(iterator, completion)
12166  } catch (error) {
12167    var returnMethod = iterator['return'];
12168    if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
12169    throw error;
12170  }
12171};
12172
12173
12174/***/ }),
12175/* 247 */
12176/***/ (function(module, exports, __webpack_require__) {
12177
12178var wellKnownSymbol = __webpack_require__(5);
12179var Iterators = __webpack_require__(35);
12180
12181var ITERATOR = wellKnownSymbol('iterator');
12182var ArrayPrototype = Array.prototype;
12183
12184// check on default Array iterator
12185module.exports = function (it) {
12186  return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
12187};
12188
12189
12190/***/ }),
12191/* 248 */
12192/***/ (function(module, exports, __webpack_require__) {
12193
12194var classof = __webpack_require__(249);
12195var Iterators = __webpack_require__(35);
12196var wellKnownSymbol = __webpack_require__(5);
12197
12198var ITERATOR = wellKnownSymbol('iterator');
12199
12200module.exports = function (it) {
12201  if (it != undefined) return it[ITERATOR]
12202    || it['@@iterator']
12203    || Iterators[classof(it)];
12204};
12205
12206
12207/***/ }),
12208/* 249 */
12209/***/ (function(module, exports, __webpack_require__) {
12210
12211var classofRaw = __webpack_require__(80);
12212var wellKnownSymbol = __webpack_require__(5);
12213
12214var TO_STRING_TAG = wellKnownSymbol('toStringTag');
12215// ES3 wrong here
12216var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
12217
12218// fallback for IE11 Script Access Denied error
12219var tryGet = function (it, key) {
12220  try {
12221    return it[key];
12222  } catch (error) { /* empty */ }
12223};
12224
12225// getting tag from ES6+ `Object.prototype.toString`
12226module.exports = function (it) {
12227  var O, tag, result;
vendor: 4,904 bytes, lines 12228-12399
12228  return it === undefined ? 'Undefined' : it === null ? 'Null'
12229    // @@toStringTag case
12230    : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
12231    // builtinTag case
12232    : CORRECT_ARGUMENTS ? classofRaw(O)
12233    // ES3 arguments fallback
12234    : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
12235};
12236
12237
12238/***/ }),
12239/* 250 */
12240/***/ (function(module, exports, __webpack_require__) {
12241
12242var wellKnownSymbol = __webpack_require__(5);
12243
12244var ITERATOR = wellKnownSymbol('iterator');
12245var SAFE_CLOSING = false;
12246
12247try {
12248  var called = 0;
12249  var iteratorWithReturn = {
12250    next: function () {
12251      return { done: !!called++ };
12252    },
12253    'return': function () {
12254      SAFE_CLOSING = true;
12255    }
12256  };
12257  iteratorWithReturn[ITERATOR] = function () {
12258    return this;
12259  };
12260  // eslint-disable-next-line no-throw-literal
12261  Array.from(iteratorWithReturn, function () { throw 2; });
12262} catch (error) { /* empty */ }
12263
12264module.exports = function (exec, SKIP_CLOSING) {
12265  if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
12266  var ITERATION_SUPPORT = false;
12267  try {
12268    var object = {};
12269    object[ITERATOR] = function () {
12270      return {
12271        next: function () {
12272          return { done: ITERATION_SUPPORT = true };
12273        }
12274      };
12275    };
12276    exec(object);
12277  } catch (error) { /* empty */ }
12278  return ITERATION_SUPPORT;
12279};
12280
12281
12282/***/ }),
12283/* 251 */
12284/***/ (function(module, exports, __webpack_require__) {
12285
12286var $ = __webpack_require__(0);
12287var isArray = __webpack_require__(28);
12288
12289// `Array.isArray` method
12290// https://tc39.github.io/ecma262/#sec-array.isarray
12291$({ target: 'Array', stat: true }, {
12292  isArray: isArray
12293});
12294
12295
12296/***/ }),
12297/* 252 */
12298/***/ (function(module, exports, __webpack_require__) {
12299
12300"use strict";
12301
12302var $ = __webpack_require__(0);
12303var fails = __webpack_require__(8);
12304var createProperty = __webpack_require__(36);
12305
12306var ISNT_GENERIC = fails(function () {
12307  function F() { /* empty */ }
12308  return !(Array.of.call(F) instanceof F);
12309});
12310
12311// `Array.of` method
12312// https://tc39.github.io/ecma262/#sec-array.of
12313// WebKit Array.of isn't generic
12314$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
12315  of: function of(/* ...args */) {
12316    var index = 0;
12317    var argumentsLength = arguments.length;
12318    var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
12319    while (argumentsLength > index) createProperty(result, index, arguments[index++]);
12320    result.length = argumentsLength;
12321    return result;
12322  }
12323});
12324
12325
12326/***/ }),
12327/* 253 */
12328/***/ (function(module, exports, __webpack_require__) {
12329
12330"use strict";
12331
12332var $ = __webpack_require__(0);
12333var fails = __webpack_require__(8);
12334var isArray = __webpack_require__(28);
12335var isObject = __webpack_require__(16);
12336var toObject = __webpack_require__(4);
12337var toLength = __webpack_require__(3);
12338var createProperty = __webpack_require__(36);
12339var arraySpeciesCreate = __webpack_require__(37);
12340var arrayMethodHasSpeciesSupport = __webpack_require__(38);
12341var wellKnownSymbol = __webpack_require__(5);
12342
12343var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
12344var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
12345var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
12346
12347var IS_CONCAT_SPREADABLE_SUPPORT = !fails(function () {
12348  var array = [];
12349  array[IS_CONCAT_SPREADABLE] = false;
12350  return array.concat()[0] !== array;
12351});
12352
12353var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
12354
12355var isConcatSpreadable = function (O) {
12356  if (!isObject(O)) return false;
12357  var spreadable = O[IS_CONCAT_SPREADABLE];
12358  return spreadable !== undefined ? !!spreadable : isArray(O);
12359};
12360
12361var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
12362
12363// `Array.prototype.concat` method
12364// https://tc39.github.io/ecma262/#sec-array.prototype.concat
12365// with adding support of @@isConcatSpreadable and @@species
12366$({ target: 'Array', proto: true, forced: FORCED }, {
12367  concat: function concat(arg) { // eslint-disable-line no-unused-vars
12368    var O = toObject(this);
12369    var A = arraySpeciesCreate(O, 0);
12370    var n = 0;
12371    var i, k, length, len, E;
12372    for (i = -1, length = arguments.length; i < length; i++) {
12373      E = i === -1 ? O : arguments[i];
12374      if (isConcatSpreadable(E)) {
12375        len = toLength(E.length);
12376        if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
12377        for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
12378      } else {
12379        if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
12380        createProperty(A, n++, E);
12381      }
12382    }
12383    A.length = n;
12384    return A;
12385  }
12386});
12387
12388
12389/***/ }),
12390/* 254 */
12391/***/ (function(module, exports, __webpack_require__) {
12392
12393var $ = __webpack_require__(0);
12394var copyWithin = __webpack_require__(255);
12395var addToUnscopables = __webpack_require__(11);
12396
12397// `Array.prototype.copyWithin` method
12398// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
12399$({ target: 'Array', proto: true }, {
vendor: 5,297 bytes, lines 12400-12588
12400  copyWithin: copyWithin
12401});
12402
12403// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
12404addToUnscopables('copyWithin');
12405
12406
12407/***/ }),
12408/* 255 */
12409/***/ (function(module, exports, __webpack_require__) {
12410
12411"use strict";
12412
12413var toObject = __webpack_require__(4);
12414var toAbsoluteIndex = __webpack_require__(34);
12415var toLength = __webpack_require__(3);
12416
12417var min = Math.min;
12418
12419// `Array.prototype.copyWithin` method implementation
12420// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
12421module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
12422  var O = toObject(this);
12423  var len = toLength(O.length);
12424  var to = toAbsoluteIndex(target, len);
12425  var from = toAbsoluteIndex(start, len);
12426  var end = arguments.length > 2 ? arguments[2] : undefined;
12427  var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
12428  var inc = 1;
12429  if (from < to && to < from + count) {
12430    inc = -1;
12431    from += count - 1;
12432    to += count - 1;
12433  }
12434  while (count-- > 0) {
12435    if (from in O) O[to] = O[from];
12436    else delete O[to];
12437    to += inc;
12438    from += inc;
12439  } return O;
12440};
12441
12442
12443/***/ }),
12444/* 256 */
12445/***/ (function(module, exports, __webpack_require__) {
12446
12447"use strict";
12448
12449var $ = __webpack_require__(0);
12450var $every = __webpack_require__(23).every;
12451var sloppyArrayMethod = __webpack_require__(13);
12452
12453// `Array.prototype.every` method
12454// https://tc39.github.io/ecma262/#sec-array.prototype.every
12455$({ target: 'Array', proto: true, forced: sloppyArrayMethod('every') }, {
12456  every: function every(callbackfn /* , thisArg */) {
12457    return $every(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12458  }
12459});
12460
12461
12462/***/ }),
12463/* 257 */
12464/***/ (function(module, exports, __webpack_require__) {
12465
12466var $ = __webpack_require__(0);
12467var fill = __webpack_require__(258);
12468var addToUnscopables = __webpack_require__(11);
12469
12470// `Array.prototype.fill` method
12471// https://tc39.github.io/ecma262/#sec-array.prototype.fill
12472$({ target: 'Array', proto: true }, {
12473  fill: fill
12474});
12475
12476// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
12477addToUnscopables('fill');
12478
12479
12480/***/ }),
12481/* 258 */
12482/***/ (function(module, exports, __webpack_require__) {
12483
12484"use strict";
12485
12486var toObject = __webpack_require__(4);
12487var toAbsoluteIndex = __webpack_require__(34);
12488var toLength = __webpack_require__(3);
12489
12490// `Array.prototype.fill` method implementation
12491// https://tc39.github.io/ecma262/#sec-array.prototype.fill
12492module.exports = function fill(value /* , start = 0, end = @length */) {
12493  var O = toObject(this);
12494  var length = toLength(O.length);
12495  var argumentsLength = arguments.length;
12496  var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
12497  var end = argumentsLength > 2 ? arguments[2] : undefined;
12498  var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
12499  while (endPos > index) O[index++] = value;
12500  return O;
12501};
12502
12503
12504/***/ }),
12505/* 259 */
12506/***/ (function(module, exports, __webpack_require__) {
12507
12508"use strict";
12509
12510var $ = __webpack_require__(0);
12511var $filter = __webpack_require__(23).filter;
12512var arrayMethodHasSpeciesSupport = __webpack_require__(38);
12513
12514// `Array.prototype.filter` method
12515// https://tc39.github.io/ecma262/#sec-array.prototype.filter
12516// with adding support of @@species
12517$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('filter') }, {
12518  filter: function filter(callbackfn /* , thisArg */) {
12519    return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12520  }
12521});
12522
12523
12524/***/ }),
12525/* 260 */
12526/***/ (function(module, exports, __webpack_require__) {
12527
12528"use strict";
12529
12530var $ = __webpack_require__(0);
12531var $find = __webpack_require__(23).find;
12532var addToUnscopables = __webpack_require__(11);
12533
12534var FIND = 'find';
12535var SKIPS_HOLES = true;
12536
12537// Shouldn't skip holes
12538if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
12539
12540// `Array.prototype.find` method
12541// https://tc39.github.io/ecma262/#sec-array.prototype.find
12542$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
12543  find: function find(callbackfn /* , that = undefined */) {
12544    return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12545  }
12546});
12547
12548// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
12549addToUnscopables(FIND);
12550
12551
12552/***/ }),
12553/* 261 */
12554/***/ (function(module, exports, __webpack_require__) {
12555
12556"use strict";
12557
12558var $ = __webpack_require__(0);
12559var $findIndex = __webpack_require__(23).findIndex;
12560var addToUnscopables = __webpack_require__(11);
12561
12562var FIND_INDEX = 'findIndex';
12563var SKIPS_HOLES = true;
12564
12565// Shouldn't skip holes
12566if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
12567
12568// `Array.prototype.findIndex` method
12569// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
12570$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
12571  findIndex: function findIndex(callbackfn /* , that = undefined */) {
12572    return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12573  }
12574});
12575
12576// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
12577addToUnscopables(FIND_INDEX);
12578
12579
12580/***/ }),
12581/* 262 */
12582/***/ (function(module, exports, __webpack_require__) {
12583
12584"use strict";
12585
12586var $ = __webpack_require__(0);
12587var flattenIntoArray = __webpack_require__(125);
12588var toObject = __webpack_require__(4);
12589var toLength = __webpack_require__(3);
12590var toInteger = __webpack_require__(26);
12591var arraySpeciesCreate = __webpack_require__(37);
12592
12593// `Array.prototype.flat` method
12594// https://github.com/tc39/proposal-flatMap
12595$({ target: 'Array', proto: true }, {
12596  flat: function flat(/* depthArg = 1 */) {
12597    var depthArg = arguments.length ? arguments[0] : undefined;
12598    var O = toObject(this);
12599    var sourceLen = toLength(O.length);
12600    var A = arraySpeciesCreate(O, 0);
12601    A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
12602    return A;
12603  }
12604});
12605
12606
12607/***/ }),
12608/* 263 */
12609/***/ (function(module, exports, __webpack_require__) {
12610
12611"use strict";
12612
12613var $ = __webpack_require__(0);
12614var flattenIntoArray = __webpack_require__(125);
12615var toObject = __webpack_require__(4);
12616var toLength = __webpack_require__(3);
12617var aFunction = __webpack_require__(55);
12618var arraySpeciesCreate = __webpack_require__(37);
12619
12620// `Array.prototype.flatMap` method
12621// https://github.com/tc39/proposal-flatMap
12622$({ target: 'Array', proto: true }, {
12623  flatMap: function flatMap(callbackfn /* , thisArg */) {
12624    var O = toObject(this);
12625    var sourceLen = toLength(O.length);
12626    var A;
12627    aFunction(callbackfn);
12628    A = arraySpeciesCreate(O, 0);
12629    A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12630    return A;
12631  }
12632});
12633
12634
12635/***/ }),
12636/* 264 */
12637/***/ (function(module, exports, __webpack_require__) {
12638
12639"use strict";
12640
12641var $ = __webpack_require__(0);
12642var forEach = __webpack_require__(265);
12643
12644// `Array.prototype.forEach` method
12645// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
12646$({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
12647  forEach: forEach
12648});
12649
12650
12651/***/ }),
12652/* 265 */
12653/***/ (function(module, exports, __webpack_require__) {
12654
12655"use strict";
12656
12657var $forEach = __webpack_require__(23).forEach;
12658var sloppyArrayMethod = __webpack_require__(13);
12659
12660// `Array.prototype.forEach` method implementation
12661// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
12662module.exports = sloppyArrayMethod('forEach') ? function forEach(callbackfn /* , thisArg */) {
12663  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12664} : [].forEach;
12665
12666
12667/***/ }),
12668/* 266 */
12669/***/ (function(module, exports, __webpack_require__) {
12670
12671"use strict";
12672
12673var $ = __webpack_require__(0);
12674var $indexOf = __webpack_require__(82).indexOf;
12675var sloppyArrayMethod = __webpack_require__(13);
12676
12677var nativeIndexOf = [].indexOf;
12678
12679var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
12680var SLOPPY_METHOD = sloppyArrayMethod('indexOf');
12681
12682// `Array.prototype.indexOf` method
12683// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
12684$({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || SLOPPY_METHOD }, {
12685  indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
12686    return NEGATIVE_ZERO
12687      // convert -0 to +0
12688      ? nativeIndexOf.apply(this, arguments) || 0
12689      : $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
12690  }
12691});
12692
12693
12694/***/ }),
12695/* 267 */
12696/***/ (function(module, exports, __webpack_require__) {
12697
12698"use strict";
12699
12700var toIndexedObject = __webpack_require__(22);
12701var addToUnscopables = __webpack_require__(11);
12702var Iterators = __webpack_require__(35);
12703var InternalStateModule = __webpack_require__(74);
12704var defineIterator = __webpack_require__(116);
12705
12706var ARRAY_ITERATOR = 'Array Iterator';
12707var setInternalState = InternalStateModule.set;
12708var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
12709
12710// `Array.prototype.entries` method
12711// https://tc39.github.io/ecma262/#sec-array.prototype.entries
12712// `Array.prototype.keys` method
12713// https://tc39.github.io/ecma262/#sec-array.prototype.keys
12714// `Array.prototype.values` method
12715// https://tc39.github.io/ecma262/#sec-array.prototype.values
12716// `Array.prototype[@@iterator]` method
12717// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
12718// `CreateArrayIterator` internal method
12719// https://tc39.github.io/ecma262/#sec-createarrayiterator
12720module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
12721  setInternalState(this, {
12722    type: ARRAY_ITERATOR,
12723    target: toIndexedObject(iterated), // target
12724    index: 0,                          // next index
12725    kind: kind                         // kind
12726  });
12727// `%ArrayIteratorPrototype%.next` method
12728// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
12729}, function () {
12730  var state = getInternalState(this);
12731  var target = state.target;
12732  var kind = state.kind;
12733  var index = state.index++;
12734  if (!target || index >= target.length) {
12735    state.target = undefined;
12736    return { value: undefined, done: true };
12737  }
12738  if (kind == 'keys') return { value: index, done: false };
12739  if (kind == 'values') return { value: target[index], done: false };
12740  return { value: [index, target[index]], done: false };
12741}, 'values');
12742
12743// argumentsList[@@iterator] is %ArrayProto_values%
12744// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
12745// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
12746Iterators.Arguments = Iterators.Array;
12747
12748// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
12749addToUnscopables('keys');
12750addToUnscopables('values');
12751addToUnscopables('entries');
12752
12753
12754/***/ }),
12755/* 268 */
12756/***/ (function(module, exports, __webpack_require__) {
12757
12758"use strict";
12759
12760var $ = __webpack_require__(0);
12761var IndexedObject = __webpack_require__(53);
12762var toIndexedObject = __webpack_require__(22);
12763var sloppyArrayMethod = __webpack_require__(13);
12764
12765var nativeJoin = [].join;
12766
12767var ES3_STRINGS = IndexedObject != Object;
12768var SLOPPY_METHOD = sloppyArrayMethod('join', ',');
12769
12770// `Array.prototype.join` method
12771// https://tc39.github.io/ecma262/#sec-array.prototype.join
12772$({ target: 'Array', proto: true, forced: ES3_STRINGS || SLOPPY_METHOD }, {
12773  join: function join(separator) {
12774    return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
12775  }
12776});
12777
12778
12779/***/ }),
12780/* 269 */
12781/***/ (function(module, exports, __webpack_require__) {
12782
12783var $ = __webpack_require__(0);
12784var lastIndexOf = __webpack_require__(270);
12785
12786// `Array.prototype.lastIndexOf` method
12787// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
12788$({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
12789  lastIndexOf: lastIndexOf
12790});
12791
12792
12793/***/ }),
12794/* 270 */
12795/***/ (function(module, exports, __webpack_require__) {
12796
12797"use strict";
12798
12799var toIndexedObject = __webpack_require__(22);
12800var toInteger = __webpack_require__(26);
vendor: 7,775 bytes, lines 12801-13061
12801var toLength = __webpack_require__(3);
12802var sloppyArrayMethod = __webpack_require__(13);
12803
12804var min = Math.min;
12805var nativeLastIndexOf = [].lastIndexOf;
12806var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
12807var SLOPPY_METHOD = sloppyArrayMethod('lastIndexOf');
12808
12809// `Array.prototype.lastIndexOf` method implementation
12810// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
12811module.exports = (NEGATIVE_ZERO || SLOPPY_METHOD) ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
12812  // convert -0 to +0
12813  if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
12814  var O = toIndexedObject(this);
12815  var length = toLength(O.length);
12816  var index = length - 1;
12817  if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
12818  if (index < 0) index = length + index;
12819  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
12820  return -1;
12821} : nativeLastIndexOf;
12822
12823
12824/***/ }),
12825/* 271 */
12826/***/ (function(module, exports, __webpack_require__) {
12827
12828"use strict";
12829
12830var $ = __webpack_require__(0);
12831var $map = __webpack_require__(23).map;
12832var arrayMethodHasSpeciesSupport = __webpack_require__(38);
12833
12834// `Array.prototype.map` method
12835// https://tc39.github.io/ecma262/#sec-array.prototype.map
12836// with adding support of @@species
12837$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('map') }, {
12838  map: function map(callbackfn /* , thisArg */) {
12839    return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12840  }
12841});
12842
12843
12844/***/ }),
12845/* 272 */
12846/***/ (function(module, exports, __webpack_require__) {
12847
12848"use strict";
12849
12850var $ = __webpack_require__(0);
12851var $reduce = __webpack_require__(127).left;
12852var sloppyArrayMethod = __webpack_require__(13);
12853
12854// `Array.prototype.reduce` method
12855// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
12856$({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduce') }, {
12857  reduce: function reduce(callbackfn /* , initialValue */) {
12858    return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
12859  }
12860});
12861
12862
12863/***/ }),
12864/* 273 */
12865/***/ (function(module, exports, __webpack_require__) {
12866
12867"use strict";
12868
12869var $ = __webpack_require__(0);
12870var $reduceRight = __webpack_require__(127).right;
12871var sloppyArrayMethod = __webpack_require__(13);
12872
12873// `Array.prototype.reduceRight` method
12874// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
12875$({ target: 'Array', proto: true, forced: sloppyArrayMethod('reduceRight') }, {
12876  reduceRight: function reduceRight(callbackfn /* , initialValue */) {
12877    return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
12878  }
12879});
12880
12881
12882/***/ }),
12883/* 274 */
12884/***/ (function(module, exports, __webpack_require__) {
12885
12886"use strict";
12887
12888var $ = __webpack_require__(0);
12889var isArray = __webpack_require__(28);
12890
12891var nativeReverse = [].reverse;
12892var test = [1, 2];
12893
12894// `Array.prototype.reverse` method
12895// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
12896// fix for Safari 12.0 bug
12897// https://bugs.webkit.org/show_bug.cgi?id=188794
12898$({ target: 'Array', proto: true, forced: String(test) === String(test.reverse()) }, {
12899  reverse: function reverse() {
12900    if (isArray(this)) this.length = this.length;
12901    return nativeReverse.call(this);
12902  }
12903});
12904
12905
12906/***/ }),
12907/* 275 */
12908/***/ (function(module, exports, __webpack_require__) {
12909
12910"use strict";
12911
12912var $ = __webpack_require__(0);
12913var isObject = __webpack_require__(16);
12914var isArray = __webpack_require__(28);
12915var toAbsoluteIndex = __webpack_require__(34);
12916var toLength = __webpack_require__(3);
12917var toIndexedObject = __webpack_require__(22);
12918var createProperty = __webpack_require__(36);
12919var arrayMethodHasSpeciesSupport = __webpack_require__(38);
12920var wellKnownSymbol = __webpack_require__(5);
12921
12922var SPECIES = wellKnownSymbol('species');
12923var nativeSlice = [].slice;
12924var max = Math.max;
12925
12926// `Array.prototype.slice` method
12927// https://tc39.github.io/ecma262/#sec-array.prototype.slice
12928// fallback for not array-like ES3 strings and DOM objects
12929$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('slice') }, {
12930  slice: function slice(start, end) {
12931    var O = toIndexedObject(this);
12932    var length = toLength(O.length);
12933    var k = toAbsoluteIndex(start, length);
12934    var fin = toAbsoluteIndex(end === undefined ? length : end, length);
12935    // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
12936    var Constructor, result, n;
12937    if (isArray(O)) {
12938      Constructor = O.constructor;
12939      // cross-realm fallback
12940      if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
12941        Constructor = undefined;
12942      } else if (isObject(Constructor)) {
12943        Constructor = Constructor[SPECIES];
12944        if (Constructor === null) Constructor = undefined;
12945      }
12946      if (Constructor === Array || Constructor === undefined) {
12947        return nativeSlice.call(O, k, fin);
12948      }
12949    }
12950    result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
12951    for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
12952    result.length = n;
12953    return result;
12954  }
12955});
12956
12957
12958/***/ }),
12959/* 276 */
12960/***/ (function(module, exports, __webpack_require__) {
12961
12962"use strict";
12963
12964var $ = __webpack_require__(0);
12965var $some = __webpack_require__(23).some;
12966var sloppyArrayMethod = __webpack_require__(13);
12967
12968// `Array.prototype.some` method
12969// https://tc39.github.io/ecma262/#sec-array.prototype.some
12970$({ target: 'Array', proto: true, forced: sloppyArrayMethod('some') }, {
12971  some: function some(callbackfn /* , thisArg */) {
12972    return $some(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
12973  }
12974});
12975
12976
12977/***/ }),
12978/* 277 */
12979/***/ (function(module, exports, __webpack_require__) {
12980
12981"use strict";
12982
12983var $ = __webpack_require__(0);
12984var aFunction = __webpack_require__(55);
12985var toObject = __webpack_require__(4);
12986var fails = __webpack_require__(8);
12987var sloppyArrayMethod = __webpack_require__(13);
12988
12989var nativeSort = [].sort;
12990var test = [1, 2, 3];
12991
12992// IE8-
12993var FAILS_ON_UNDEFINED = fails(function () {
12994  test.sort(undefined);
12995});
12996// V8 bug
12997var FAILS_ON_NULL = fails(function () {
12998  test.sort(null);
12999});
13000// Old WebKit
13001var SLOPPY_METHOD = sloppyArrayMethod('sort');
13002
13003var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || SLOPPY_METHOD;
13004
13005// `Array.prototype.sort` method
13006// https://tc39.github.io/ecma262/#sec-array.prototype.sort
13007$({ target: 'Array', proto: true, forced: FORCED }, {
13008  sort: function sort(comparefn) {
13009    return comparefn === undefined
13010      ? nativeSort.call(toObject(this))
13011      : nativeSort.call(toObject(this), aFunction(comparefn));
13012  }
13013});
13014
13015
13016/***/ }),
13017/* 278 */
13018/***/ (function(module, exports, __webpack_require__) {
13019
13020var setSpecies = __webpack_require__(279);
13021
13022// `Array[@@species]` getter
13023// https://tc39.github.io/ecma262/#sec-get-array-@@species
13024setSpecies('Array');
13025
13026
13027/***/ }),
13028/* 279 */
13029/***/ (function(module, exports, __webpack_require__) {
13030
13031"use strict";
13032
13033var getBuiltIn = __webpack_require__(81);
13034var definePropertyModule = __webpack_require__(15);
13035var wellKnownSymbol = __webpack_require__(5);
13036var DESCRIPTORS = __webpack_require__(14);
13037
13038var SPECIES = wellKnownSymbol('species');
13039
13040module.exports = function (CONSTRUCTOR_NAME) {
13041  var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
13042  var defineProperty = definePropertyModule.f;
13043
13044  if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
13045    defineProperty(Constructor, SPECIES, {
13046      configurable: true,
13047      get: function () { return this; }
13048    });
13049  }
13050};
13051
13052
13053/***/ }),
13054/* 280 */
13055/***/ (function(module, exports, __webpack_require__) {
13056
13057"use strict";
13058
13059var $ = __webpack_require__(0);
13060var toAbsoluteIndex = __webpack_require__(34);
13061var toInteger = __webpack_require__(26);
13062var toLength = __webpack_require__(3);
13063var toObject = __webpack_require__(4);
13064var arraySpeciesCreate = __webpack_require__(37);
13065var createProperty = __webpack_require__(36);
13066var arrayMethodHasSpeciesSupport = __webpack_require__(38);
13067
13068var max = Math.max;
13069var min = Math.min;
13070var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
13071var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
13072
13073// `Array.prototype.splice` method
13074// https://tc39.github.io/ecma262/#sec-array.prototype.splice
13075// with adding support of @@species
13076$({ target: 'Array', proto: true, forced: !arrayMethodHasSpeciesSupport('splice') }, {
13077  splice: function splice(start, deleteCount /* , ...items */) {
13078    var O = toObject(this);
13079    var len = toLength(O.length);
13080    var actualStart = toAbsoluteIndex(start, len);
13081    var argumentsLength = arguments.length;
13082    var insertCount, actualDeleteCount, A, k, from, to;
13083    if (argumentsLength === 0) {
13084      insertCount = actualDeleteCount = 0;
13085    } else if (argumentsLength === 1) {
13086      insertCount = 0;
13087      actualDeleteCount = len - actualStart;
13088    } else {
13089      insertCount = argumentsLength - 2;
13090      actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
13091    }
13092    if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
13093      throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
13094    }
13095    A = arraySpeciesCreate(O, actualDeleteCount);
13096    for (k = 0; k < actualDeleteCount; k++) {
13097      from = actualStart + k;
13098      if (from in O) createProperty(A, k, O[from]);
13099    }
13100    A.length = actualDeleteCount;
13101    if (insertCount < actualDeleteCount) {
13102      for (k = actualStart; k < len - actualDeleteCount; k++) {
13103        from = k + actualDeleteCount;
13104        to = k + insertCount;
13105        if (from in O) O[to] = O[from];
13106        else delete O[to];
13107      }
13108      for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
13109    } else if (insertCount > actualDeleteCount) {
13110      for (k = len - actualDeleteCount; k > actualStart; k--) {
13111        from = k + actualDeleteCount - 1;
13112        to = k + insertCount - 1;
13113        if (from in O) O[to] = O[from];
13114        else delete O[to];
13115      }
13116    }
13117    for (k = 0; k < insertCount; k++) {
13118      O[k + actualStart] = arguments[k + 2];
13119    }
13120    O.length = len - actualDeleteCount + insertCount;
13121    return A;
13122  }
13123});
13124
13125
13126/***/ }),
13127/* 281 */
13128/***/ (function(module, exports, __webpack_require__) {
13129
13130// this method was added to unscopables after implementation
13131// in popular engines, so it's moved to a separate module
13132var addToUnscopables = __webpack_require__(11);
13133
13134addToUnscopables('flat');
13135
13136
13137/***/ }),
13138/* 282 */
13139/***/ (function(module, exports, __webpack_require__) {
13140
13141// this method was added to unscopables after implementation
13142// in popular engines, so it's moved to a separate module
13143var addToUnscopables = __webpack_require__(11);
13144
13145addToUnscopables('flatMap');
13146
13147
13148/***/ }),
13149/* 283 */
13150/***/ (function(module, exports, __webpack_require__) {
13151
13152"use strict";
13153
13154var DESCRIPTORS = __webpack_require__(14);
13155var addToUnscopables = __webpack_require__(11);
13156var toObject = __webpack_require__(4);
13157var toLength = __webpack_require__(3);
13158var defineProperty = __webpack_require__(15).f;
13159
13160// `Array.prototype.lastIndex` accessor
13161// https://github.com/keithamus/proposal-array-last
13162if (DESCRIPTORS && !('lastItem' in [])) {
13163  defineProperty(Array.prototype, 'lastItem', {
13164    configurable: true,
13165    get: function lastItem() {
13166      var O = toObject(this);
13167      var len = toLength(O.length);
13168      return len == 0 ? undefined : O[len - 1];
13169    },
13170    set: function lastItem(value) {
13171      var O = toObject(this);
13172      var len = toLength(O.length);
13173      return O[len == 0 ? 0 : len - 1] = value;
13174    }
13175  });
13176
13177  addToUnscopables('lastItem');
13178}
13179
13180
13181/***/ }),
13182/* 284 */
13183/***/ (function(module, exports, __webpack_require__) {
13184
13185"use strict";
13186
13187var DESCRIPTORS = __webpack_require__(14);
13188var addToUnscopables = __webpack_require__(11);
13189var toObject = __webpack_require__(4);
13190var toLength = __webpack_require__(3);
13191var defineProperty = __webpack_require__(15).f;
13192
13193// `Array.prototype.lastIndex` getter
13194// https://github.com/keithamus/proposal-array-last
13195if (DESCRIPTORS && !('lastIndex' in [])) {
13196  defineProperty(Array.prototype, 'lastIndex', {
13197    configurable: true,
13198    get: function lastIndex() {
13199      var O = toObject(this);
13200      var len = toLength(O.length);
13201      return len == 0 ? 0 : len - 1;
13202    }
13203  });
13204
13205  addToUnscopables('lastIndex');
13206}
13207
13208
13209/***/ }),
13210/* 285 */
13211/***/ (function(module, exports, __webpack_require__) {
13212
13213var __WEBPACK_AMD_DEFINE_RESULT__;(typeof navigator !== "undefined") && (function(root, factory) {
13214    if (true) {
13215        !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
13216            return factory(root);
13217        }).call(exports, __webpack_require__, exports, module),
13218				__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
13219    } else {}
13220}((window || {}), function(window) {
13221    "use strict";
13222    var svgNS = "http://www.w3.org/2000/svg";
13223
13224var locationHref = '';
13225
13226var initialDefaultFrame = -999999;
13227
13228var subframeEnabled = true;
13229var expressionsPlugin;
13230var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
13231var cachedColors = {};
13232var bm_rounder = Math.round;
13233var bm_rnd;
13234var bm_pow = Math.pow;
13235var bm_sqrt = Math.sqrt;
13236var bm_abs = Math.abs;
13237var bm_floor = Math.floor;
13238var bm_max = Math.max;
13239var bm_min = Math.min;
13240var blitter = 10;
13241
13242var BMMath = {};
13243(function(){
13244    var propertyNames = ["abs", "acos", "acosh", "asin", "asinh", "atan", "atanh", "atan2", "ceil", "cbrt", "expm1", "clz32", "cos", "cosh", "exp", "floor", "fround", "hypot", "imul", "log", "log1p", "log2", "log10", "max", "min", "pow", "random", "round", "sign", "sin", "sinh", "sqrt", "tan", "tanh", "trunc", "E", "LN10", "LN2", "LOG10E", "LOG2E", "PI", "SQRT1_2", "SQRT2"];
13245    var i, len = propertyNames.length;
13246    for(i=0;i<len;i+=1){
13247        BMMath[propertyNames[i]] = Math[propertyNames[i]];
13248    }
13249}());
13250
13251function ProjectInterface(){return {};}
13252
13253BMMath.random = Math.random;
13254BMMath.abs = function(val){
13255    var tOfVal = typeof val;
13256    if(tOfVal === 'object' && val.length){
13257        var absArr = createSizedArray(val.length);
13258        var i, len = val.length;
13259        for(i=0;i<len;i+=1){
13260            absArr[i] = Math.abs(val[i]);
13261        }
13262        return absArr;
13263    }
13264    return Math.abs(val);
13265
13266};
13267var defaultCurveSegments = 150;
13268var degToRads = Math.PI/180;
13269var roundCorner = 0.5519;
13270
13271function roundValues(flag){
13272    if(flag){
13273        bm_rnd = Math.round;
13274    }else{
13275        bm_rnd = function(val){
13276            return val;
13277        };
13278    }
13279}
13280roundValues(false);
13281
13282function styleDiv(element){
13283    element.style.position = 'absolute';
13284    element.style.top = 0;
13285    element.style.left = 0;
13286    element.style.display = 'block';
13287    element.style.transformOrigin = element.style.webkitTransformOrigin = '0 0';
13288    element.style.backfaceVisibility  = element.style.webkitBackfaceVisibility = 'visible';
13289    element.style.transformStyle = element.style.webkitTransformStyle = element.style.mozTransformStyle = "preserve-3d";
13290}
13291
13292function BMEnterFrameEvent(type, currentTime, totalTime, frameMultiplier){
13293    this.type = type;
13294    this.currentTime = currentTime;
13295    this.totalTime = totalTime;
13296    this.direction = frameMultiplier < 0 ? -1 : 1;
13297}
13298
13299function BMCompleteEvent(type, frameMultiplier){
13300    this.type = type;
13301    this.direction = frameMultiplier < 0 ? -1 : 1;
13302}
13303
13304function BMCompleteLoopEvent(type, totalLoops, currentLoop, frameMultiplier){
13305    this.type = type;
13306    this.currentLoop = currentLoop;
13307    this.totalLoops = totalLoops;
13308    this.direction = frameMultiplier < 0 ? -1 : 1;
13309}
13310
13311function BMSegmentStartEvent(type, firstFrame, totalFrames){
13312    this.type = type;
13313    this.firstFrame = firstFrame;
13314    this.totalFrames = totalFrames;
13315}
13316
13317function BMDestroyEvent(type, target){
13318    this.type = type;
13319    this.target = target;
13320}
13321
13322function BMRenderFrameErrorEvent(nativeError, currentTime) {
13323    this.type = 'renderFrameError';
13324    this.nativeError = nativeError;
13325    this.currentTime = currentTime;
13326}
13327
13328function BMConfigErrorEvent(nativeError) {
13329    this.type = 'configError';
13330    this.nativeError = nativeError;
13331}
13332
13333function BMAnimationConfigErrorEvent(type, nativeError) {
13334    this.type = type;
13335    this.nativeError = nativeError;
13336    this.currentTime = currentTime;
13337}
13338
13339var createElementID = (function(){
13340    var _count = 0;
13341    return function createID() {
13342        return '__lottie_element_' + ++_count
13343    }
13344}())
13345
13346function HSVtoRGB(h, s, v) {
13347    var r, g, b, i, f, p, q, t;
13348    i = Math.floor(h * 6);
13349    f = h * 6 - i;
13350    p = v * (1 - s);
13351    q = v * (1 - f * s);
13352    t = v * (1 - (1 - f) * s);
13353    switch (i % 6) {
13354        case 0: r = v; g = t; b = p; break;
13355        case 1: r = q; g = v; b = p; break;
13356        case 2: r = p; g = v; b = t; break;
13357        case 3: r = p; g = q; b = v; break;
13358        case 4: r = t; g = p; b = v; break;
13359        case 5: r = v; g = p; b = q; break;
13360    }
13361    return [ r,
13362        g,
13363         b ];
13364}
13365
13366function RGBtoHSV(r, g, b) {
13367    var max = Math.max(r, g, b), min = Math.min(r, g, b),
13368        d = max - min,
13369        h,
13370        s = (max === 0 ? 0 : d / max),
13371        v = max / 255;
13372
13373    switch (max) {
13374        case min: h = 0; break;
13375        case r: h = (g - b) + d * (g < b ? 6: 0); h /= 6 * d; break;
13376        case g: h = (b - r) + d * 2; h /= 6 * d; break;
13377        case b: h = (r - g) + d * 4; h /= 6 * d; break;
13378    }
13379
13380    return [
13381         h,
13382         s,
13383         v
13384    ];
13385}
13386
13387function addSaturationToRGB(color,offset){
13388    var hsv = RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);
13389    hsv[1] += offset;
13390    if (hsv[1] > 1) {
13391        hsv[1] = 1;
13392    }
13393    else if (hsv[1] <= 0) {
13394        hsv[1] = 0;
13395    }
13396    return HSVtoRGB(hsv[0],hsv[1],hsv[2]);
13397}
13398
13399function addBrightnessToRGB(color,offset){
13400    var hsv = RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);
13401    hsv[2] += offset;
13402    if (hsv[2] > 1) {
13403        hsv[2] = 1;
13404    }
13405    else if (hsv[2] < 0) {
13406        hsv[2] = 0;
13407    }
13408    return HSVtoRGB(hsv[0],hsv[1],hsv[2]);
13409}
13410
13411function addHueToRGB(color,offset) {
13412    var hsv = RGBtoHSV(color[0]*255,color[1]*255,color[2]*255);
13413    hsv[0] += offset/360;
13414    if (hsv[0] > 1) {
13415        hsv[0] -= 1;
13416    }
13417    else if (hsv[0] < 0) {
13418        hsv[0] += 1;
13419    }
13420    return HSVtoRGB(hsv[0],hsv[1],hsv[2]);
13421}
13422
13423var rgbToHex = (function(){
13424    var colorMap = [];
13425    var i;
13426    var hex;
13427    for(i=0;i<256;i+=1){
13428        hex = i.toString(16);
13429        colorMap[i] = hex.length == 1 ? '0' + hex : hex;
13430    }
13431
13432    return function(r, g, b) {
13433        if(r<0){
13434            r = 0;
13435        }
13436        if(g<0){
13437            g = 0;
13438        }
13439        if(b<0){
13440            b = 0;
13441        }
13442        return '#' + colorMap[r] + colorMap[g] + colorMap[b];
13443    };
13444}());
13445function BaseEvent(){}
13446BaseEvent.prototype = {
13447	triggerEvent: function (eventName, args) {
13448	    if (this._cbs[eventName]) {
13449	        var len = this._cbs[eventName].length;
13450	        for (var i = 0; i < len; i++){
13451	            this._cbs[eventName][i](args);
13452	        }
13453	    }
13454	},
13455	addEventListener: function (eventName, callback) {
13456	    if (!this._cbs[eventName]){
13457	        this._cbs[eventName] = [];
13458	    }
13459	    this._cbs[eventName].push(callback);
13460
13461		return function() {
13462			this.removeEventListener(eventName, callback);
13463		}.bind(this);
13464	},
13465	removeEventListener: function (eventName,callback){
13466	    if (!callback){
13467	        this._cbs[eventName] = null;
13468	    }else if(this._cbs[eventName]){
13469	        var i = 0, len = this._cbs[eventName].length;
13470	        while(i<len){
13471	            if(this._cbs[eventName][i] === callback){
13472	                this._cbs[eventName].splice(i,1);
13473	                i -=1;
13474	                len -= 1;
13475	            }
13476	            i += 1;
13477	        }
13478	        if(!this._cbs[eventName].length){
13479	            this._cbs[eventName] = null;
13480	        }
13481	    }
13482	}
13483};
13484var createTypedArray = (function(){
13485	function createRegularArray(type, len){
13486		var i = 0, arr = [], value;
13487		switch(type) {
13488			case 'int16':
13489			case 'uint8c':
13490				value = 1;
13491				break;
13492			default:
13493				value = 1.1;
13494				break;
13495		}
13496		for(i = 0; i < len; i += 1) {
13497			arr.push(value);
13498		}
13499		return arr;
13500	}
13501	function createTypedArray(type, len){
13502		if(type === 'float32') {
13503			return new Float32Array(len);
13504		} else if(type === 'int16') {
13505			return new Int16Array(len);
13506		} else if(type === 'uint8c') {
13507			return new Uint8ClampedArray(len);
13508		}
13509	}
13510	if(typeof Uint8ClampedArray === 'function' && typeof Float32Array === 'function') {
13511		return createTypedArray;
13512	} else {
13513		return createRegularArray;
13514	}
13515}());
13516
13517function createSizedArray(len) {
13518	return Array.apply(null,{length:len});
13519}
13520function createNS(type) {
13521	//return {appendChild:function(){},setAttribute:function(){},style:{}}
13522	return document.createElementNS(svgNS, type);
13523}
13524function createTag(type) {
13525	//return {appendChild:function(){},setAttribute:function(){},style:{}}
13526	return document.createElement(type);
13527}
13528function DynamicPropertyContainer(){};
13529DynamicPropertyContainer.prototype = {
13530	addDynamicProperty: function(prop) {
13531		if(this.dynamicProperties.indexOf(prop) === -1) {
13532	        this.dynamicProperties.push(prop);
13533	        this.container.addDynamicProperty(this);
13534	    	this._isAnimated = true;
13535	    }
13536	},
13537	iterateDynamicProperties: function(){
13538	    this._mdf = false;
13539	    var i, len = this.dynamicProperties.length;
vendor: 6,997 bytes, lines 13540-13776
13540	    for(i=0;i<len;i+=1){
13541	        this.dynamicProperties[i].getValue();
13542	        if(this.dynamicProperties[i]._mdf) {
13543	            this._mdf = true;
13544	        }
13545	    }
13546	},
13547	initDynamicPropertyContainer: function(container){
13548	    this.container = container;
13549	    this.dynamicProperties = [];
13550	    this._mdf = false;
13551	    this._isAnimated = false;
13552	}
13553}
13554var getBlendMode = (function() {
13555
13556	var blendModeEnums = {
13557        0:'source-over',
13558        1:'multiply',
13559        2:'screen',
13560        3:'overlay',
13561        4:'darken',
13562        5:'lighten',
13563        6:'color-dodge',
13564        7:'color-burn',
13565        8:'hard-light',
13566        9:'soft-light',
13567        10:'difference',
13568        11:'exclusion',
13569        12:'hue',
13570        13:'saturation',
13571        14:'color',
13572        15:'luminosity'
13573    }
13574
13575	return function(mode) {
13576		return blendModeEnums[mode] || '';
13577	}
13578}())
13579/*!
13580 Transformation Matrix v2.0
13581 (c) Epistemex 2014-2015
13582 www.epistemex.com
13583 By Ken Fyrstenberg
13584 Contributions by leeoniya.
13585 License: MIT, header required.
13586 */
13587
13588/**
13589 * 2D transformation matrix object initialized with identity matrix.
13590 *
13591 * The matrix can synchronize a canvas context by supplying the context
13592 * as an argument, or later apply current absolute transform to an
13593 * existing context.
13594 *
13595 * All values are handled as floating point values.
13596 *
13597 * @param {CanvasRenderingContext2D} [context] - Optional context to sync with Matrix
13598 * @prop {number} a - scale x
13599 * @prop {number} b - shear y
13600 * @prop {number} c - shear x
13601 * @prop {number} d - scale y
13602 * @prop {number} e - translate x
13603 * @prop {number} f - translate y
13604 * @prop {CanvasRenderingContext2D|null} [context=null] - set or get current canvas context
13605 * @constructor
13606 */
13607
13608var Matrix = (function(){
13609
13610    var _cos = Math.cos;
13611    var _sin = Math.sin;
13612    var _tan = Math.tan;
13613    var _rnd = Math.round;
13614
13615    function reset(){
13616        this.props[0] = 1;
13617        this.props[1] = 0;
13618        this.props[2] = 0;
13619        this.props[3] = 0;
13620        this.props[4] = 0;
13621        this.props[5] = 1;
13622        this.props[6] = 0;
13623        this.props[7] = 0;
13624        this.props[8] = 0;
13625        this.props[9] = 0;
13626        this.props[10] = 1;
13627        this.props[11] = 0;
13628        this.props[12] = 0;
13629        this.props[13] = 0;
13630        this.props[14] = 0;
13631        this.props[15] = 1;
13632        return this;
13633    }
13634
13635    function rotate(angle) {
13636        if(angle === 0){
13637            return this;
13638        }
13639        var mCos = _cos(angle);
13640        var mSin = _sin(angle);
13641        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
13642    }
13643
13644    function rotateX(angle){
13645        if(angle === 0){
13646            return this;
13647        }
13648        var mCos = _cos(angle);
13649        var mSin = _sin(angle);
13650        return this._t(1, 0, 0, 0, 0, mCos, -mSin, 0, 0, mSin,  mCos, 0, 0, 0, 0, 1);
13651    }
13652
13653    function rotateY(angle){
13654        if(angle === 0){
13655            return this;
13656        }
13657        var mCos = _cos(angle);
13658        var mSin = _sin(angle);
13659        return this._t(mCos,  0,  mSin, 0, 0, 1, 0, 0, -mSin,  0,  mCos, 0, 0, 0, 0, 1);
13660    }
13661
13662    function rotateZ(angle){
13663        if(angle === 0){
13664            return this;
13665        }
13666        var mCos = _cos(angle);
13667        var mSin = _sin(angle);
13668        return this._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
13669    }
13670
13671    function shear(sx,sy){
13672        return this._t(1, sy, sx, 1, 0, 0);
13673    }
13674
13675    function skew(ax, ay){
13676        return this.shear(_tan(ax), _tan(ay));
13677    }
13678
13679    function skewFromAxis(ax, angle){
13680        var mCos = _cos(angle);
13681        var mSin = _sin(angle);
13682        return this._t(mCos, mSin,  0, 0, -mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1)
13683            ._t(1, 0,  0, 0, _tan(ax),  1, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1)
13684            ._t(mCos, -mSin,  0, 0, mSin,  mCos, 0, 0, 0,  0,  1, 0, 0, 0, 0, 1);
13685        //return this._t(mCos, mSin, -mSin, mCos, 0, 0)._t(1, 0, _tan(ax), 1, 0, 0)._t(mCos, -mSin, mSin, mCos, 0, 0);
13686    }
13687
13688    function scale(sx, sy, sz) {
13689        if(!sz && sz !== 0) {
13690            sz = 1;
13691        }
13692        if(sx === 1 && sy === 1 && sz === 1){
13693            return this;
13694        }
13695        return this._t(sx, 0, 0, 0, 0, sy, 0, 0, 0, 0, sz, 0, 0, 0, 0, 1);
13696    }
13697
13698    function setTransform(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) {
13699        this.props[0] = a;
13700        this.props[1] = b;
13701        this.props[2] = c;
13702        this.props[3] = d;
13703        this.props[4] = e;
13704        this.props[5] = f;
13705        this.props[6] = g;
13706        this.props[7] = h;
13707        this.props[8] = i;
13708        this.props[9] = j;
13709        this.props[10] = k;
13710        this.props[11] = l;
13711        this.props[12] = m;
13712        this.props[13] = n;
13713        this.props[14] = o;
13714        this.props[15] = p;
13715        return this;
13716    }
13717
13718    function translate(tx, ty, tz) {
13719        tz = tz || 0;
13720        if(tx !== 0 || ty !== 0 || tz !== 0){
13721            return this._t(1,0,0,0,0,1,0,0,0,0,1,0,tx,ty,tz,1);
13722        }
13723        return this;
13724    }
13725
13726    function transform(a2, b2, c2, d2, e2, f2, g2, h2, i2, j2, k2, l2, m2, n2, o2, p2) {
13727
13728        var _p = this.props;
13729
13730        if(a2 === 1 && b2 === 0 && c2 === 0 && d2 === 0 && e2 === 0 && f2 === 1 && g2 === 0 && h2 === 0 && i2 === 0 && j2 === 0 && k2 === 1 && l2 === 0){
13731            //NOTE: commenting this condition because TurboFan deoptimizes code when present
13732            //if(m2 !== 0 || n2 !== 0 || o2 !== 0){
13733                _p[12] = _p[12] * a2 + _p[15] * m2;
13734                _p[13] = _p[13] * f2 + _p[15] * n2;
13735                _p[14] = _p[14] * k2 + _p[15] * o2;
13736                _p[15] = _p[15] * p2;
13737            //}
13738            this._identityCalculated = false;
13739            return this;
13740        }
13741
13742        var a1 = _p[0];
13743        var b1 = _p[1];
13744        var c1 = _p[2];
13745        var d1 = _p[3];
13746        var e1 = _p[4];
13747        var f1 = _p[5];
13748        var g1 = _p[6];
13749        var h1 = _p[7];
13750        var i1 = _p[8];
13751        var j1 = _p[9];
13752        var k1 = _p[10];
13753        var l1 = _p[11];
13754        var m1 = _p[12];
13755        var n1 = _p[13];
13756        var o1 = _p[14];
13757        var p1 = _p[15];
13758
13759        /* matrix order (canvas compatible):
13760         * ace
13761         * bdf
13762         * 001
13763         */
13764        _p[0] = a1 * a2 + b1 * e2 + c1 * i2 + d1 * m2;
13765        _p[1] = a1 * b2 + b1 * f2 + c1 * j2 + d1 * n2 ;
13766        _p[2] = a1 * c2 + b1 * g2 + c1 * k2 + d1 * o2 ;
13767        _p[3] = a1 * d2 + b1 * h2 + c1 * l2 + d1 * p2 ;
13768
13769        _p[4] = e1 * a2 + f1 * e2 + g1 * i2 + h1 * m2 ;
13770        _p[5] = e1 * b2 + f1 * f2 + g1 * j2 + h1 * n2 ;
13771        _p[6] = e1 * c2 + f1 * g2 + g1 * k2 + h1 * o2 ;
13772        _p[7] = e1 * d2 + f1 * h2 + g1 * l2 + h1 * p2 ;
13773
13774        _p[8] = i1 * a2 + j1 * e2 + k1 * i2 + l1 * m2 ;
13775        _p[9] = i1 * b2 + j1 * f2 + k1 * j2 + l1 * n2 ;
13776        _p[10] = i1 * c2 + j1 * g2 + k1 * k2 + l1 * o2 ;
vendor: 5,368 bytes, lines 13777-13920
13777        _p[11] = i1 * d2 + j1 * h2 + k1 * l2 + l1 * p2 ;
13778
13779        _p[12] = m1 * a2 + n1 * e2 + o1 * i2 + p1 * m2 ;
13780        _p[13] = m1 * b2 + n1 * f2 + o1 * j2 + p1 * n2 ;
13781        _p[14] = m1 * c2 + n1 * g2 + o1 * k2 + p1 * o2 ;
13782        _p[15] = m1 * d2 + n1 * h2 + o1 * l2 + p1 * p2 ;
13783
13784        this._identityCalculated = false;
13785        return this;
13786    }
13787
13788    function isIdentity() {
13789        if(!this._identityCalculated){
13790            this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1);
13791            this._identityCalculated = true;
13792        }
13793        return this._identity;
13794    }
13795
13796    function equals(matr){
13797        var i = 0;
13798        while (i < 16) {
13799            if(matr.props[i] !== this.props[i]) {
13800                return false;
13801            }
13802            i+=1;
13803        }
13804        return true;
13805    }
13806
13807    function clone(matr){
13808        var i;
13809        for(i=0;i<16;i+=1){
13810            matr.props[i] = this.props[i];
13811        }
13812    }
13813
13814    function cloneFromProps(props){
13815        var i;
13816        for(i=0;i<16;i+=1){
13817            this.props[i] = props[i];
13818        }
13819    }
13820
13821    function applyToPoint(x, y, z) {
13822
13823        return {
13824            x: x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],
13825            y: x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],
13826            z: x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]
13827        };
13828        /*return {
13829         x: x * me.a + y * me.c + me.e,
13830         y: x * me.b + y * me.d + me.f
13831         };*/
13832    }
13833    function applyToX(x, y, z) {
13834        return x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12];
13835    }
13836    function applyToY(x, y, z) {
13837        return x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13];
13838    }
13839    function applyToZ(x, y, z) {
13840        return x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14];
13841    }
13842
13843    function inversePoint(pt) {
13844        var determinant = this.props[0] * this.props[5] - this.props[1] * this.props[4];
13845        var a = this.props[5]/determinant;
13846        var b = - this.props[1]/determinant;
13847        var c = - this.props[4]/determinant;
13848        var d = this.props[0]/determinant;
13849        var e = (this.props[4] * this.props[13] - this.props[5] * this.props[12])/determinant;
13850        var f = - (this.props[0] * this.props[13] - this.props[1] * this.props[12])/determinant;
13851        return [pt[0] * a + pt[1] * c + e, pt[0] * b + pt[1] * d + f, 0];
13852    }
13853
13854    function inversePoints(pts){
13855        var i, len = pts.length, retPts = [];
13856        for(i=0;i<len;i+=1){
13857            retPts[i] = inversePoint(pts[i]);
13858        }
13859        return retPts;
13860    }
13861
13862    function applyToTriplePoints(pt1, pt2, pt3) {
13863        var arr = createTypedArray('float32', 6);
13864        if(this.isIdentity()) {
13865            arr[0] = pt1[0];
13866            arr[1] = pt1[1];
13867            arr[2] = pt2[0];
13868            arr[3] = pt2[1];
13869            arr[4] = pt3[0];
13870            arr[5] = pt3[1];
13871        } else {
13872            var p0 = this.props[0], p1 = this.props[1], p4 = this.props[4], p5 = this.props[5], p12 = this.props[12], p13 = this.props[13];
13873            arr[0] = pt1[0] * p0 + pt1[1] * p4 + p12;
13874            arr[1] = pt1[0] * p1 + pt1[1] * p5 + p13;
13875            arr[2] = pt2[0] * p0 + pt2[1] * p4 + p12;
13876            arr[3] = pt2[0] * p1 + pt2[1] * p5 + p13;
13877            arr[4] = pt3[0] * p0 + pt3[1] * p4 + p12;
13878            arr[5] = pt3[0] * p1 + pt3[1] * p5 + p13;
13879        }
13880        return arr;
13881    }
13882
13883    function applyToPointArray(x,y,z){
13884        var arr;
13885        if(this.isIdentity()) {
13886            arr = [x,y,z];
13887        } else {
13888            arr = [x * this.props[0] + y * this.props[4] + z * this.props[8] + this.props[12],x * this.props[1] + y * this.props[5] + z * this.props[9] + this.props[13],x * this.props[2] + y * this.props[6] + z * this.props[10] + this.props[14]];
13889        }
13890        return arr;
13891    }
13892
13893    function applyToPointStringified(x, y) {
13894        if(this.isIdentity()) {
13895            return x + ',' + y;
13896        }
13897        var _p = this.props;
13898        return Math.round((x * _p[0] + y * _p[4] + _p[12]) * 100) / 100+','+ Math.round((x * _p[1] + y * _p[5] + _p[13]) * 100) / 100;
13899    }
13900
13901    function toCSS() {
13902        //Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.
13903        /*if(this.isIdentity()) {
13904            return '';
13905        }*/
13906        var i = 0;
13907        var props = this.props;
13908        var cssValue = 'matrix3d(';
13909        var v = 10000;
13910        while(i<16){
13911            cssValue += _rnd(props[i]*v)/v;
13912            cssValue += i === 15 ? ')':',';
13913            i += 1;
13914        }
13915        return cssValue;
13916    }
13917
13918    function roundMatrixProperty(val) {
13919        var v = 10000;
13920        if((val < 0.000001 && val > 0) || (val > -0.000001 && val < 0)) {
vendor: 14,962 bytes, lines 13921-14321
13921            return _rnd(val * v) / v;
13922        }
13923        return val;
13924    }
13925
13926    function to2dCSS() {
13927        //Doesn't make much sense to add this optimization. If it is an identity matrix, it's very likely this will get called only once since it won't be keyframed.
13928        /*if(this.isIdentity()) {
13929            return '';
13930        }*/
13931        var props = this.props;
13932        var _a = roundMatrixProperty(props[0]);
13933        var _b = roundMatrixProperty(props[1]);
13934        var _c = roundMatrixProperty(props[4]);
13935        var _d = roundMatrixProperty(props[5]);
13936        var _e = roundMatrixProperty(props[12]);
13937        var _f = roundMatrixProperty(props[13]);
13938        return "matrix(" + _a + ',' + _b + ',' + _c + ',' + _d + ',' + _e + ',' + _f + ")";
13939    }
13940
13941    return function(){
13942        this.reset = reset;
13943        this.rotate = rotate;
13944        this.rotateX = rotateX;
13945        this.rotateY = rotateY;
13946        this.rotateZ = rotateZ;
13947        this.skew = skew;
13948        this.skewFromAxis = skewFromAxis;
13949        this.shear = shear;
13950        this.scale = scale;
13951        this.setTransform = setTransform;
13952        this.translate = translate;
13953        this.transform = transform;
13954        this.applyToPoint = applyToPoint;
13955        this.applyToX = applyToX;
13956        this.applyToY = applyToY;
13957        this.applyToZ = applyToZ;
13958        this.applyToPointArray = applyToPointArray;
13959        this.applyToTriplePoints = applyToTriplePoints;
13960        this.applyToPointStringified = applyToPointStringified;
13961        this.toCSS = toCSS;
13962        this.to2dCSS = to2dCSS;
13963        this.clone = clone;
13964        this.cloneFromProps = cloneFromProps;
13965        this.equals = equals;
13966        this.inversePoints = inversePoints;
13967        this.inversePoint = inversePoint;
13968        this._t = this.transform;
13969        this.isIdentity = isIdentity;
13970        this._identity = true;
13971        this._identityCalculated = false;
13972
13973        this.props = createTypedArray('float32', 16);
13974        this.reset();
13975    };
13976}());
13977
13978/*
13979 Copyright 2014 David Bau.
13980
13981 Permission is hereby granted, free of charge, to any person obtaining
13982 a copy of this software and associated documentation files (the
13983 "Software"), to deal in the Software without restriction, including
13984 without limitation the rights to use, copy, modify, merge, publish,
13985 distribute, sublicense, and/or sell copies of the Software, and to
13986 permit persons to whom the Software is furnished to do so, subject to
13987 the following conditions:
13988
13989 The above copyright notice and this permission notice shall be
13990 included in all copies or substantial portions of the Software.
13991
13992 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13993 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
13994 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
13995 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
13996 CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
13997 TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
13998 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
13999
14000 */
14001
14002(function (pool, math) {
14003//
14004// The following constants are related to IEEE 754 limits.
14005//
14006    var global = this,
14007        width = 256,        // each RC4 output is 0 <= x < 256
14008        chunks = 6,         // at least six RC4 outputs for each double
14009        digits = 52,        // there are 52 significant digits in a double
14010        rngname = 'random', // rngname: name for Math.random and Math.seedrandom
14011        startdenom = math.pow(width, chunks),
14012        significance = math.pow(2, digits),
14013        overflow = significance * 2,
14014        mask = width - 1,
14015        nodecrypto;         // node.js crypto module, initialized at the bottom.
14016
14017//
14018// seedrandom()
14019// This is the seedrandom function described above.
14020//
14021    function seedrandom(seed, options, callback) {
14022        var key = [];
14023        options = (options === true) ? { entropy: true } : (options || {});
14024
14025        // Flatten the seed string or build one from local entropy if needed.
14026        var shortseed = mixkey(flatten(
14027            options.entropy ? [seed, tostring(pool)] :
14028                (seed === null) ? autoseed() : seed, 3), key);
14029
14030        // Use the seed to initialize an ARC4 generator.
14031        var arc4 = new ARC4(key);
14032
14033        // This function returns a random double in [0, 1) that contains
14034        // randomness in every bit of the mantissa of the IEEE 754 value.
14035        var prng = function() {
14036            var n = arc4.g(chunks),             // Start with a numerator n < 2 ^ 48
14037                d = startdenom,                 //   and denominator d = 2 ^ 48.
14038                x = 0;                          //   and no 'extra last byte'.
14039            while (n < significance) {          // Fill up all significant digits by
14040                n = (n + x) * width;              //   shifting numerator and
14041                d *= width;                       //   denominator and generating a
14042                x = arc4.g(1);                    //   new least-significant-byte.
14043            }
14044            while (n >= overflow) {             // To avoid rounding up, before adding
14045                n /= 2;                           //   last byte, shift everything
14046                d /= 2;                           //   right using integer math until
14047                x >>>= 1;                         //   we have exactly the desired bits.
14048            }
14049            return (n + x) / d;                 // Form the number within [0, 1).
14050        };
14051
14052        prng.int32 = function() { return arc4.g(4) | 0; };
14053        prng.quick = function() { return arc4.g(4) / 0x100000000; };
14054        prng.double = prng;
14055
14056        // Mix the randomness into accumulated entropy.
14057        mixkey(tostring(arc4.S), pool);
14058
14059        // Calling convention: what to return as a function of prng, seed, is_math.
14060        return (options.pass || callback ||
14061        function(prng, seed, is_math_call, state) {
14062            if (state) {
14063                // Load the arc4 state from the given state if it has an S array.
14064                if (state.S) { copy(state, arc4); }
14065                // Only provide the .state method if requested via options.state.
14066                prng.state = function() { return copy(arc4, {}); };
14067            }
14068
14069            // If called as a method of Math (Math.seedrandom()), mutate
14070            // Math.random because that is how seedrandom.js has worked since v1.0.
14071            if (is_math_call) { math[rngname] = prng; return seed; }
14072
14073            // Otherwise, it is a newer calling convention, so return the
14074            // prng directly.
14075            else return prng;
14076        })(
14077            prng,
14078            shortseed,
14079            'global' in options ? options.global : (this == math),
14080            options.state);
14081    }
14082    math['seed' + rngname] = seedrandom;
14083
14084//
14085// ARC4
14086//
14087// An ARC4 implementation.  The constructor takes a key in the form of
14088// an array of at most (width) integers that should be 0 <= x < (width).
14089//
14090// The g(count) method returns a pseudorandom integer that concatenates
14091// the next (count) outputs from ARC4.  Its return value is a number x
14092// that is in the range 0 <= x < (width ^ count).
14093//
14094    function ARC4(key) {
14095        var t, keylen = key.length,
14096            me = this, i = 0, j = me.i = me.j = 0, s = me.S = [];
14097
14098        // The empty key [] is treated as [0].
14099        if (!keylen) { key = [keylen++]; }
14100
14101        // Set up S using the standard key scheduling algorithm.
14102        while (i < width) {
14103            s[i] = i++;
14104        }
14105        for (i = 0; i < width; i++) {
14106            s[i] = s[j = mask & (j + key[i % keylen] + (t = s[i]))];
14107            s[j] = t;
14108        }
14109
14110        // The "g" method returns the next (count) outputs as one number.
14111        me.g = function(count) {
14112            // Using instance members instead of closure state nearly doubles speed.
14113            var t, r = 0,
14114                i = me.i, j = me.j, s = me.S;
14115            while (count--) {
14116                t = s[i = mask & (i + 1)];
14117                r = r * width + s[mask & ((s[i] = s[j = mask & (j + t)]) + (s[j] = t))];
14118            }
14119            me.i = i; me.j = j;
14120            return r;
14121            // For robust unpredictability, the function call below automatically
14122            // discards an initial batch of values.  This is called RC4-drop[256].
14123            // See http://google.com/search?q=rsa+fluhrer+response&btnI
14124        };
14125    }
14126
14127//
14128// copy()
14129// Copies internal state of ARC4 to or from a plain object.
14130//
14131    function copy(f, t) {
14132        t.i = f.i;
14133        t.j = f.j;
14134        t.S = f.S.slice();
14135        return t;
14136    }
14137
14138//
14139// flatten()
14140// Converts an object tree to nested arrays of strings.
14141//
14142    function flatten(obj, depth) {
14143        var result = [], typ = (typeof obj), prop;
14144        if (depth && typ == 'object') {
14145            for (prop in obj) {
14146                try { result.push(flatten(obj[prop], depth - 1)); } catch (e) {}
14147            }
14148        }
14149        return (result.length ? result : typ == 'string' ? obj : obj + '\0');
14150    }
14151
14152//
14153// mixkey()
14154// Mixes a string seed into a key that is an array of integers, and
14155// returns a shortened string seed that is equivalent to the result key.
14156//
14157    function mixkey(seed, key) {
14158        var stringseed = seed + '', smear, j = 0;
14159        while (j < stringseed.length) {
14160            key[mask & j] =
14161                mask & ((smear ^= key[mask & j] * 19) + stringseed.charCodeAt(j++));
14162        }
14163        return tostring(key);
14164    }
14165
14166//
14167// autoseed()
14168// Returns an object for autoseeding, using window.crypto and Node crypto
14169// module if available.
14170//
14171    function autoseed() {
14172        try {
14173            if (nodecrypto) { return tostring(nodecrypto.randomBytes(width)); }
14174            var out = new Uint8Array(width);
14175            (global.crypto || global.msCrypto).getRandomValues(out);
14176            return tostring(out);
14177        } catch (e) {
14178            var browser = global.navigator,
14179                plugins = browser && browser.plugins;
14180            return [+new Date(), global, plugins, global.screen, tostring(pool)];
14181        }
14182    }
14183
14184//
14185// tostring()
14186// Converts an array of charcodes to a string
14187//
14188    function tostring(a) {
14189        return String.fromCharCode.apply(0, a);
14190    }
14191
14192//
14193// When seedrandom.js is loaded, we immediately mix a few bits
14194// from the built-in RNG into the entropy pool.  Because we do
14195// not want to interfere with deterministic PRNG state later,
14196// seedrandom will not call math.random on its own again after
14197// initialization.
14198//
14199    mixkey(math.random(), pool);
14200
14201//
14202// Nodejs and AMD support: export the implementation as a module using
14203// either convention.
14204//
14205
14206// End anonymous scope, and pass initial values.
14207})(
14208    [],     // pool: entropy pool starts empty
14209    BMMath    // math: package containing random, pow, and seedrandom
14210);
14211var BezierFactory = (function(){
14212    /**
14213     * BezierEasing - use bezier curve for transition easing function
14214     * by Gaëtan Renaudeau 2014 - 2015 – MIT License
14215     *
14216     * Credits: is based on Firefox's nsSMILKeySpline.cpp
14217     * Usage:
14218     * var spline = BezierEasing([ 0.25, 0.1, 0.25, 1.0 ])
14219     * spline.get(x) => returns the easing value | x must be in [0, 1] range
14220     *
14221     */
14222
14223        var ob = {};
14224    ob.getBezierEasing = getBezierEasing;
14225    var beziers = {};
14226
14227    function getBezierEasing(a,b,c,d,nm){
14228        var str = nm || ('bez_' + a+'_'+b+'_'+c+'_'+d).replace(/\./g, 'p');
14229        if(beziers[str]){
14230            return beziers[str];
14231        }
14232        var bezEasing = new BezierEasing([a,b,c,d]);
14233        beziers[str] = bezEasing;
14234        return bezEasing;
14235    }
14236
14237// These values are established by empiricism with tests (tradeoff: performance VS precision)
14238    var NEWTON_ITERATIONS = 4;
14239    var NEWTON_MIN_SLOPE = 0.001;
14240    var SUBDIVISION_PRECISION = 0.0000001;
14241    var SUBDIVISION_MAX_ITERATIONS = 10;
14242
14243    var kSplineTableSize = 11;
14244    var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
14245
14246    var float32ArraySupported = typeof Float32Array === "function";
14247
14248    function A (aA1, aA2) { return 1.0 - 3.0 * aA2 + 3.0 * aA1; }
14249    function B (aA1, aA2) { return 3.0 * aA2 - 6.0 * aA1; }
14250    function C (aA1)      { return 3.0 * aA1; }
14251
14252// Returns x(t) given t, x1, and x2, or y(t) given t, y1, and y2.
14253    function calcBezier (aT, aA1, aA2) {
14254        return ((A(aA1, aA2)*aT + B(aA1, aA2))*aT + C(aA1))*aT;
14255    }
14256
14257// Returns dx/dt given t, x1, and x2, or dy/dt given t, y1, and y2.
14258    function getSlope (aT, aA1, aA2) {
14259        return 3.0 * A(aA1, aA2)*aT*aT + 2.0 * B(aA1, aA2) * aT + C(aA1);
14260    }
14261
14262    function binarySubdivide (aX, aA, aB, mX1, mX2) {
14263        var currentX, currentT, i = 0;
14264        do {
14265            currentT = aA + (aB - aA) / 2.0;
14266            currentX = calcBezier(currentT, mX1, mX2) - aX;
14267            if (currentX > 0.0) {
14268                aB = currentT;
14269            } else {
14270                aA = currentT;
14271            }
14272        } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);
14273        return currentT;
14274    }
14275
14276    function newtonRaphsonIterate (aX, aGuessT, mX1, mX2) {
14277        for (var i = 0; i < NEWTON_ITERATIONS; ++i) {
14278            var currentSlope = getSlope(aGuessT, mX1, mX2);
14279            if (currentSlope === 0.0) return aGuessT;
14280            var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
14281            aGuessT -= currentX / currentSlope;
14282        }
14283        return aGuessT;
14284    }
14285
14286    /**
14287     * points is an array of [ mX1, mY1, mX2, mY2 ]
14288     */
14289    function BezierEasing (points) {
14290        this._p = points;
14291        this._mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
14292        this._precomputed = false;
14293
14294        this.get = this.get.bind(this);
14295    }
14296
14297    BezierEasing.prototype = {
14298
14299        get: function (x) {
14300            var mX1 = this._p[0],
14301                mY1 = this._p[1],
14302                mX2 = this._p[2],
14303                mY2 = this._p[3];
14304            if (!this._precomputed) this._precompute();
14305            if (mX1 === mY1 && mX2 === mY2) return x; // linear
14306            // Because JavaScript number are imprecise, we should guarantee the extremes are right.
14307            if (x === 0) return 0;
14308            if (x === 1) return 1;
14309            return calcBezier(this._getTForX(x), mY1, mY2);
14310        },
14311
14312        // Private part
14313
14314        _precompute: function () {
14315            var mX1 = this._p[0],
14316                mY1 = this._p[1],
14317                mX2 = this._p[2],
14318                mY2 = this._p[3];
14319            this._precomputed = true;
14320            if (mX1 !== mY1 || mX2 !== mY2)
14321                this._calcSampleValues();
vendor: 8,982 bytes, lines 14322-14550
14322        },
14323
14324        _calcSampleValues: function () {
14325            var mX1 = this._p[0],
14326                mX2 = this._p[2];
14327            for (var i = 0; i < kSplineTableSize; ++i) {
14328                this._mSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
14329            }
14330        },
14331
14332        /**
14333         * getTForX chose the fastest heuristic to determine the percentage value precisely from a given X projection.
14334         */
14335        _getTForX: function (aX) {
14336            var mX1 = this._p[0],
14337                mX2 = this._p[2],
14338                mSampleValues = this._mSampleValues;
14339
14340            var intervalStart = 0.0;
14341            var currentSample = 1;
14342            var lastSample = kSplineTableSize - 1;
14343
14344            for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
14345                intervalStart += kSampleStepSize;
14346            }
14347            --currentSample;
14348
14349            // Interpolate to provide an initial guess for t
14350            var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample+1] - mSampleValues[currentSample]);
14351            var guessForT = intervalStart + dist * kSampleStepSize;
14352
14353            var initialSlope = getSlope(guessForT, mX1, mX2);
14354            if (initialSlope >= NEWTON_MIN_SLOPE) {
14355                return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
14356            } else if (initialSlope === 0.0) {
14357                return guessForT;
14358            } else {
14359                return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
14360            }
14361        }
14362    };
14363
14364    return ob;
14365
14366}());
14367(function () {
14368    var lastTime = 0;
14369    var vendors = ['ms', 'moz', 'webkit', 'o'];
14370    for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) {
14371        window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame'];
14372        window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || window[vendors[x] + 'CancelRequestAnimationFrame'];
14373    }
14374    if(!window.requestAnimationFrame)
14375        window.requestAnimationFrame = function (callback, element) {
14376            var currTime = new Date().getTime();
14377            var timeToCall = Math.max(0, 16 - (currTime - lastTime));
14378            var id = setTimeout(function () {
14379                    callback(currTime + timeToCall);
14380                },
14381                timeToCall);
14382            lastTime = currTime + timeToCall;
14383            return id;
14384        };
14385    if(!window.cancelAnimationFrame)
14386        window.cancelAnimationFrame = function (id) {
14387            clearTimeout(id);
14388        };
14389}());
14390
14391function extendPrototype(sources,destination){
14392    var i, len = sources.length, sourcePrototype;
14393    for (i = 0;i < len;i += 1) {
14394        sourcePrototype = sources[i].prototype;
14395        for (var attr in sourcePrototype) {
14396            if (sourcePrototype.hasOwnProperty(attr)) destination.prototype[attr] = sourcePrototype[attr];
14397        }
14398    }
14399}
14400
14401function getDescriptor(object, prop) {
14402    return Object.getOwnPropertyDescriptor(object, prop);
14403}
14404
14405function createProxyFunction(prototype) {
14406	function ProxyFunction(){}
14407	ProxyFunction.prototype = prototype;
14408	return ProxyFunction;
14409}
14410function bezFunction(){
14411
14412    var easingFunctions = [];
14413    var math = Math;
14414
14415    function pointOnLine2D(x1,y1, x2,y2, x3,y3){
14416        var det1 = (x1*y2) + (y1*x3) + (x2*y3) - (x3*y2) - (y3*x1) - (x2*y1);
14417        return det1 > -0.001 && det1 < 0.001;
14418    }
14419
14420    function pointOnLine3D(x1,y1,z1, x2,y2,z2, x3,y3,z3){
14421        if(z1 === 0 && z2 === 0 && z3 === 0) {
14422            return pointOnLine2D(x1,y1, x2,y2, x3,y3);
14423        }
14424        var dist1 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2) + Math.pow(z2 - z1, 2));
14425        var dist2 = Math.sqrt(Math.pow(x3 - x1, 2) + Math.pow(y3 - y1, 2) + Math.pow(z3 - z1, 2));
14426        var dist3 = Math.sqrt(Math.pow(x3 - x2, 2) + Math.pow(y3 - y2, 2) + Math.pow(z3 - z2, 2));
14427        var diffDist;
14428        if(dist1 > dist2){
14429            if(dist1 > dist3){
14430                diffDist = dist1 - dist2 - dist3;
14431            } else {
14432                diffDist = dist3 - dist2 - dist1;
14433            }
14434        } else if(dist3 > dist2){
14435            diffDist = dist3 - dist2 - dist1;
14436        } else {
14437            diffDist = dist2 - dist1 - dist3;
14438        }
14439        return diffDist > -0.0001 && diffDist < 0.0001;
14440    }
14441
14442    var getBezierLength = (function(){
14443
14444        return function(pt1,pt2,pt3,pt4){
14445            var curveSegments = defaultCurveSegments;
14446            var k;
14447            var i, len;
14448            var ptCoord,perc,addedLength = 0;
14449            var ptDistance;
14450            var point = [],lastPoint = [];
14451            var lengthData = bezier_length_pool.newElement();
14452            len = pt3.length;
14453            for(k=0;k<curveSegments;k+=1){
14454                perc = k/(curveSegments-1);
14455                ptDistance = 0;
14456                for(i=0;i<len;i+=1){
14457                    ptCoord = bm_pow(1-perc,3)*pt1[i]+3*bm_pow(1-perc,2)*perc*pt3[i]+3*(1-perc)*bm_pow(perc,2)*pt4[i]+bm_pow(perc,3)*pt2[i];
14458                    point[i] = ptCoord;
14459                    if(lastPoint[i] !== null){
14460                        ptDistance += bm_pow(point[i] - lastPoint[i],2);
14461                    }
14462                    lastPoint[i] = point[i];
14463                }
14464                if(ptDistance){
14465                    ptDistance = bm_sqrt(ptDistance);
14466                    addedLength += ptDistance;
14467                }
14468                lengthData.percents[k] = perc;
14469                lengthData.lengths[k] = addedLength;
14470            }
14471            lengthData.addedLength = addedLength;
14472            return lengthData;
14473        };
14474    }());
14475
14476    function getSegmentsLength(shapeData) {
14477        var segmentsLength = segments_length_pool.newElement();
14478        var closed = shapeData.c;
14479        var pathV = shapeData.v;
14480        var pathO = shapeData.o;
14481        var pathI = shapeData.i;
14482        var i, len = shapeData._length;
14483        var lengths = segmentsLength.lengths;
14484        var totalLength = 0;
14485        for(i=0;i<len-1;i+=1){
14486            lengths[i] = getBezierLength(pathV[i],pathV[i+1],pathO[i],pathI[i+1]);
14487            totalLength += lengths[i].addedLength;
14488        }
14489        if(closed && len){
14490            lengths[i] = getBezierLength(pathV[i],pathV[0],pathO[i],pathI[0]);
14491            totalLength += lengths[i].addedLength;
14492        }
14493        segmentsLength.totalLength = totalLength;
14494        return segmentsLength;
14495    }
14496
14497    function BezierData(length){
14498        this.segmentLength = 0;
14499        this.points = new Array(length);
14500    }
14501
14502    function PointData(partial,point){
14503        this.partialLength = partial;
14504        this.point = point;
14505    }
14506
14507    var buildBezierData = (function(){
14508
14509        var storedData = {};
14510
14511        return function (pt1, pt2, pt3, pt4){
14512            var bezierName = (pt1[0]+'_'+pt1[1]+'_'+pt2[0]+'_'+pt2[1]+'_'+pt3[0]+'_'+pt3[1]+'_'+pt4[0]+'_'+pt4[1]).replace(/\./g, 'p');
14513            if(!storedData[bezierName]){
14514                var curveSegments = defaultCurveSegments;
14515                var k, i, len;
14516                var ptCoord,perc,addedLength = 0;
14517                var ptDistance;
14518                var point,lastPoint = null;
14519                if (pt1.length === 2 && (pt1[0] != pt2[0] || pt1[1] != pt2[1]) && pointOnLine2D(pt1[0],pt1[1],pt2[0],pt2[1],pt1[0]+pt3[0],pt1[1]+pt3[1]) && pointOnLine2D(pt1[0],pt1[1],pt2[0],pt2[1],pt2[0]+pt4[0],pt2[1]+pt4[1])){
14520                    curveSegments = 2;
14521                }
14522                var bezierData = new BezierData(curveSegments);
14523                len = pt3.length;
14524                for (k = 0; k < curveSegments; k += 1) {
14525                    point = createSizedArray(len);
14526                    perc = k / (curveSegments - 1);
14527                    ptDistance = 0;
14528                    for (i = 0; i < len; i += 1){
14529                        ptCoord = bm_pow(1-perc,3)*pt1[i]+3*bm_pow(1-perc,2)*perc*(pt1[i] + pt3[i])+3*(1-perc)*bm_pow(perc,2)*(pt2[i] + pt4[i])+bm_pow(perc,3)*pt2[i];
14530                        point[i] = ptCoord;
14531                        if(lastPoint !== null){
14532                            ptDistance += bm_pow(point[i] - lastPoint[i],2);
14533                        }
14534                    }
14535                    ptDistance = bm_sqrt(ptDistance);
14536                    addedLength += ptDistance;
14537                    bezierData.points[k] = new PointData(ptDistance, point);
14538                    lastPoint = point;
14539                }
14540                bezierData.segmentLength = addedLength;
14541                storedData[bezierName] = bezierData;
14542            }
14543            return storedData[bezierName];
14544        };
14545    }());
14546
14547    function getDistancePerc(perc,bezierData){
14548        var percents = bezierData.percents;
14549        var lengths = bezierData.lengths;
14550        var len = percents.length;
vendor: 4,257 bytes, lines 14551-14652
14551        var initPos = bm_floor((len-1)*perc);
14552        var lengthPos = perc*bezierData.addedLength;
14553        var lPerc = 0;
14554        if(initPos === len - 1 || initPos === 0 || lengthPos === lengths[initPos]){
14555            return percents[initPos];
14556        }else{
14557            var dir = lengths[initPos] > lengthPos ? -1 : 1;
14558            var flag = true;
14559            while(flag){
14560                if(lengths[initPos] <= lengthPos && lengths[initPos+1] > lengthPos){
14561                    lPerc = (lengthPos - lengths[initPos]) / (lengths[initPos+1] - lengths[initPos]);
14562                    flag = false;
14563                }else{
14564                    initPos += dir;
14565                }
14566                if(initPos < 0 || initPos >= len - 1){
14567                    //FIX for TypedArrays that don't store floating point values with enough accuracy
14568                    if(initPos === len - 1) {
14569                        return percents[initPos];
14570                    }
14571                    flag = false;
14572                }
14573            }
14574            return percents[initPos] + (percents[initPos+1] - percents[initPos])*lPerc;
14575        }
14576    }
14577
14578    function getPointInSegment(pt1, pt2, pt3, pt4, percent, bezierData) {
14579        var t1 = getDistancePerc(percent,bezierData);
14580        var u0 = 1;
14581        var u1 = 1 - t1;
14582        var ptX = Math.round((u1*u1*u1* pt1[0] + (t1*u1*u1 + u1*t1*u1 + u1*u1*t1)* pt3[0] + (t1*t1*u1 + u1*t1*t1 + t1*u1*t1)*pt4[0] + t1*t1*t1* pt2[0])* 1000) / 1000;
14583        var ptY = Math.round((u1*u1*u1* pt1[1] + (t1*u1*u1 + u1*t1*u1 + u1*u1*t1)* pt3[1] + (t1*t1*u1 + u1*t1*t1 + t1*u1*t1)*pt4[1] + t1*t1*t1* pt2[1])* 1000) / 1000;
14584        return [ptX, ptY];
14585    }
14586
14587    function getSegmentArray() {
14588
14589    }
14590
14591    var bezier_segment_points = createTypedArray('float32', 8);
14592
14593    function getNewSegment(pt1,pt2,pt3,pt4,startPerc,endPerc, bezierData){
14594
14595        startPerc = startPerc < 0 ? 0 : startPerc > 1 ? 1 : startPerc;
14596        var t0 = getDistancePerc(startPerc,bezierData);
14597        endPerc = endPerc > 1 ? 1 : endPerc;
14598        var t1 = getDistancePerc(endPerc,bezierData);
14599        var i, len = pt1.length;
14600        var u0 = 1 - t0;
14601        var u1 = 1 - t1;
14602        var u0u0u0 = u0*u0*u0;
14603        var t0u0u0_3 = t0*u0*u0*3;
14604        var t0t0u0_3 = t0*t0*u0*3;
14605        var t0t0t0 = t0*t0*t0;
14606        //
14607        var u0u0u1 = u0*u0*u1;
14608        var t0u0u1_3 = t0*u0*u1 + u0*t0*u1 + u0*u0*t1;
14609        var t0t0u1_3 = t0*t0*u1 + u0*t0*t1 + t0*u0*t1;
14610        var t0t0t1 = t0*t0*t1;
14611        //
14612        var u0u1u1 = u0*u1*u1;
14613        var t0u1u1_3 = t0*u1*u1 + u0*t1*u1 + u0*u1*t1;
14614        var t0t1u1_3 = t0*t1*u1 + u0*t1*t1 + t0*u1*t1;
14615        var t0t1t1 = t0*t1*t1;
14616        //
14617        var u1u1u1 = u1*u1*u1;
14618        var t1u1u1_3 = t1*u1*u1 + u1*t1*u1 + u1*u1*t1;
14619        var t1t1u1_3 = t1*t1*u1 + u1*t1*t1 + t1*u1*t1;
14620        var t1t1t1 = t1*t1*t1;
14621        for(i=0;i<len;i+=1){
14622            bezier_segment_points[i * 4] = Math.round((u0u0u0 * pt1[i] + t0u0u0_3 * pt3[i] + t0t0u0_3 * pt4[i] + t0t0t0 * pt2[i]) * 1000) / 1000;
14623            bezier_segment_points[i * 4 + 1] = Math.round((u0u0u1 * pt1[i] + t0u0u1_3 * pt3[i] + t0t0u1_3 * pt4[i] + t0t0t1 * pt2[i]) * 1000) / 1000;
14624            bezier_segment_points[i * 4 + 2] = Math.round((u0u1u1 * pt1[i] + t0u1u1_3 * pt3[i] + t0t1u1_3 * pt4[i] + t0t1t1 * pt2[i]) * 1000) / 1000;
14625            bezier_segment_points[i * 4 + 3] = Math.round((u1u1u1 * pt1[i] + t1u1u1_3 * pt3[i] + t1t1u1_3 * pt4[i] + t1t1t1 * pt2[i]) * 1000) / 1000;
14626        }
14627
14628        return bezier_segment_points;
14629    }
14630
14631    return {
14632        getSegmentsLength : getSegmentsLength,
14633        getNewSegment : getNewSegment,
14634        getPointInSegment : getPointInSegment,
14635        buildBezierData : buildBezierData,
14636        pointOnLine2D : pointOnLine2D,
14637        pointOnLine3D : pointOnLine3D
14638    };
14639}
14640
14641var bez = bezFunction();
14642function dataFunctionManager(){
14643
14644    //var tCanvasHelper = createTag('canvas').getContext('2d');
14645
14646    function completeLayers(layers, comps, fontManager){
14647        var layerData;
14648        var animArray, lastFrame;
14649        var i, len = layers.length;
14650        var j, jLen, k, kLen;
14651        for(i=0;i<len;i+=1){
14652            layerData = layers[i];
14653            if(!('ks' in layerData) || layerData.completed){
14654                continue;
14655            }
14656            layerData.completed = true;
14657            if(layerData.tt){
14658                layers[i-1].td = layerData.tt;
14659            }
14660            animArray = [];
14661            lastFrame = -1;
14662            if(layerData.hasMask){
14663                var maskProps = layerData.masksProperties;
14664                jLen = maskProps.length;
14665                for(j=0;j<jLen;j+=1){
14666                    if(maskProps[j].pt.k.i){
14667                        convertPathsToAbsoluteValues(maskProps[j].pt.k);
14668                    }else{
14669                        kLen = maskProps[j].pt.k.length;
14670                        for(k=0;k<kLen;k+=1){
14671                            if(maskProps[j].pt.k[k].s){
14672                                convertPathsToAbsoluteValues(maskProps[j].pt.k[k].s[0]);
14673                            }
14674                            if(maskProps[j].pt.k[k].e){
14675                                convertPathsToAbsoluteValues(maskProps[j].pt.k[k].e[0]);
14676                            }
14677                        }
14678                    }
14679                }
14680            }
14681            if(layerData.ty===0){
14682                layerData.layers = findCompLayers(layerData.refId, comps);
14683                completeLayers(layerData.layers,comps, fontManager);
14684            }else if(layerData.ty === 4){
14685                completeShapes(layerData.shapes);
14686            }else if(layerData.ty == 5){
14687                completeText(layerData, fontManager);
14688            }
14689        }
14690    }
14691
14692    function findCompLayers(id,comps){
14693        var i = 0, len = comps.length;
14694        while(i<len){
14695            if(comps[i].id === id){
14696                if(!comps[i].layers.__used) {
14697                    comps[i].layers.__used = true;
14698                    return comps[i].layers;
14699                }
14700                return JSON.parse(JSON.stringify(comps[i].layers));
14701            }
14702            i += 1;
14703        }
14704    }
14705
14706    function completeShapes(arr){
14707        var i, len = arr.length;
14708        var j, jLen;
14709        var hasPaths = false;
14710        for(i=len-1;i>=0;i-=1){
14711            if(arr[i].ty == 'sh'){
14712                if(arr[i].ks.k.i){
14713                    convertPathsToAbsoluteValues(arr[i].ks.k);
14714                }else{
14715                    jLen = arr[i].ks.k.length;
14716                    for(j=0;j<jLen;j+=1){
14717                        if(arr[i].ks.k[j].s){
14718                            convertPathsToAbsoluteValues(arr[i].ks.k[j].s[0]);
14719                        }
14720                        if(arr[i].ks.k[j].e){
14721                            convertPathsToAbsoluteValues(arr[i].ks.k[j].e[0]);
14722                        }
14723                    }
14724                }
14725                hasPaths = true;
14726            }else if(arr[i].ty == 'gr'){
14727                completeShapes(arr[i].it);
14728            }
14729        }
14730        /*if(hasPaths){
14731            //mx: distance
14732            //ss: sensitivity
14733            //dc: decay
14734            arr.splice(arr.length-1,0,{
14735                "ty": "ms",
14736                "mx":20,
14737                "ss":10,
14738                 "dc":0.001,
14739                "maxDist":200
14740            });
14741        }*/
14742    }
14743
14744    function convertPathsToAbsoluteValues(path){
14745        var i, len = path.i.length;
14746        for(i=0;i<len;i+=1){
14747            path.i[i][0] += path.v[i][0];
14748            path.i[i][1] += path.v[i][1];
14749            path.o[i][0] += path.v[i][0];
14750            path.o[i][1] += path.v[i][1];
14751        }
14752    }
14753
14754    function checkVersion(minimum,animVersionString){
14755        var animVersion = animVersionString ? animVersionString.split('.') : [100,100,100];
14756        if(minimum[0]>animVersion[0]){
14757            return true;
14758        } else if(animVersion[0] > minimum[0]){
14759            return false;
14760        }
14761        if(minimum[1]>animVersion[1]){
14762            return true;
14763        } else if(animVersion[1] > minimum[1]){
14764            return false;
14765        }
14766        if(minimum[2]>animVersion[2]){
14767            return true;
14768        } else if(animVersion[2] > minimum[2]){
14769            return false;
14770        }
14771    }
14772
14773    var checkText = (function(){
14774        var minimumVersion = [4,4,14];
14775
14776        function updateTextLayer(textLayer){
14777            var documentData = textLayer.t.d;
14778            textLayer.t.d = {
14779                k: [
14780                    {
14781                        s:documentData,
14782                        t:0
14783                    }
14784                ]
14785            };
14786        }
14787
14788        function iterateLayers(layers){
14789            var i, len = layers.length;
14790            for(i=0;i<len;i+=1){
14791                if(layers[i].ty === 5){
14792                    updateTextLayer(layers[i]);
14793                }
14794            }
14795        }
14796
14797        return function (animationData){
14798            if(checkVersion(minimumVersion,animationData.v)){
14799                iterateLayers(animationData.layers);
14800                if(animationData.assets){
14801                    var i, len = animationData.assets.length;
14802                    for(i=0;i<len;i+=1){
14803                        if(animationData.assets[i].layers){
14804                            iterateLayers(animationData.assets[i].layers);
14805
14806                        }
14807                    }
14808                }
14809            }
14810        };
14811    }());
14812
14813    var checkChars = (function() {
14814        var minimumVersion = [4,7,99];
14815        return function (animationData){
14816            if(animationData.chars && !checkVersion(minimumVersion,animationData.v)){
14817                var i, len = animationData.chars.length, j, jLen, k, kLen;
14818                var pathData, paths;
14819                for(i = 0; i < len; i += 1) {
14820                    if(animationData.chars[i].data && animationData.chars[i].data.shapes) {
14821                        paths = animationData.chars[i].data.shapes[0].it;
14822                        jLen = paths.length;
14823
14824                        for(j = 0; j < jLen; j += 1) {
14825                            pathData = paths[j].ks.k;
14826                            if(!pathData.__converted) {
14827                                convertPathsToAbsoluteValues(paths[j].ks.k);
14828                                pathData.__converted = true;
14829                            }
14830                        }
14831                    }
14832                }
14833            }
14834        };
14835    }());
14836
14837    var checkColors = (function(){
14838        var minimumVersion = [4,1,9];
14839
14840        function iterateShapes(shapes){
14841            var i, len = shapes.length;
14842            var j, jLen;
14843            for(i=0;i<len;i+=1){
14844                if(shapes[i].ty === 'gr'){
14845                    iterateShapes(shapes[i].it);
14846                }else if(shapes[i].ty === 'fl' || shapes[i].ty === 'st'){
14847                    if(shapes[i].c.k && shapes[i].c.k[0].i){
14848                        jLen = shapes[i].c.k.length;
14849                        for(j=0;j<jLen;j+=1){
14850                            if(shapes[i].c.k[j].s){
14851                                shapes[i].c.k[j].s[0] /= 255;
14852                                shapes[i].c.k[j].s[1] /= 255;
14853                                shapes[i].c.k[j].s[2] /= 255;
14854                                shapes[i].c.k[j].s[3] /= 255;
14855                            }
14856                            if(shapes[i].c.k[j].e){
14857                                shapes[i].c.k[j].e[0] /= 255;
14858                                shapes[i].c.k[j].e[1] /= 255;
14859                                shapes[i].c.k[j].e[2] /= 255;
14860                                shapes[i].c.k[j].e[3] /= 255;
14861                            }
14862                        }
14863                    } else {
14864                        shapes[i].c.k[0] /= 255;
14865                        shapes[i].c.k[1] /= 255;
14866                        shapes[i].c.k[2] /= 255;
14867                        shapes[i].c.k[3] /= 255;
14868                    }
14869                }
14870            }
14871        }
14872
14873        function iterateLayers(layers){
14874            var i, len = layers.length;
14875            for(i=0;i<len;i+=1){
14876                if(layers[i].ty === 4){
14877                    iterateShapes(layers[i].shapes);
14878                }
14879            }
14880        }
14881
14882        return function (animationData){
14883            if(checkVersion(minimumVersion,animationData.v)){
14884                iterateLayers(animationData.layers);
14885                if(animationData.assets){
14886                    var i, len = animationData.assets.length;
14887                    for(i=0;i<len;i+=1){
14888                        if(animationData.assets[i].layers){
14889                            iterateLayers(animationData.assets[i].layers);
14890
14891                        }
14892                    }
14893                }
14894            }
14895        };
14896    }());
14897
14898    var checkShapes = (function(){
14899        var minimumVersion = [4,4,18];
14900
14901
14902
14903        function completeShapes(arr){
14904            var i, len = arr.length;
14905            var j, jLen;
14906            var hasPaths = false;
14907            for(i=len-1;i>=0;i-=1){
14908                if(arr[i].ty == 'sh'){
14909                    if(arr[i].ks.k.i){
14910                        arr[i].ks.k.c = arr[i].closed;
14911                    }else{
14912                        jLen = arr[i].ks.k.length;
14913                        for(j=0;j<jLen;j+=1){
14914                            if(arr[i].ks.k[j].s){
14915                                arr[i].ks.k[j].s[0].c = arr[i].closed;
14916                            }
14917                            if(arr[i].ks.k[j].e){
14918                                arr[i].ks.k[j].e[0].c = arr[i].closed;
14919                            }
14920                        }
14921                    }
14922                    hasPaths = true;
14923                }else if(arr[i].ty == 'gr'){
14924                    completeShapes(arr[i].it);
14925                }
14926            }
14927        }
14928
14929        function iterateLayers(layers){
14930            var layerData;
14931            var i, len = layers.length;
14932            var j, jLen, k, kLen;
14933            for(i=0;i<len;i+=1){
14934                layerData = layers[i];
14935                if(layerData.hasMask){
14936                    var maskProps = layerData.masksProperties;
14937                    jLen = maskProps.length;
14938                    for(j=0;j<jLen;j+=1){
14939                        if(maskProps[j].pt.k.i){
14940                            maskProps[j].pt.k.c = maskProps[j].cl;
14941                        }else{
14942                            kLen = maskProps[j].pt.k.length;
14943                            for(k=0;k<kLen;k+=1){
14944                                if(maskProps[j].pt.k[k].s){
14945                                    maskProps[j].pt.k[k].s[0].c = maskProps[j].cl;
14946                                }
14947                                if(maskProps[j].pt.k[k].e){
14948                                    maskProps[j].pt.k[k].e[0].c = maskProps[j].cl;
14949                                }
14950                            }
14951                        }
14952                    }
14953                }
14954                if(layerData.ty === 4){
14955                    completeShapes(layerData.shapes);
14956                }
14957            }
14958        }
14959
14960        return function (animationData){
14961            if(checkVersion(minimumVersion,animationData.v)){
14962                iterateLayers(animationData.layers);
14963                if(animationData.assets){
14964                    var i, len = animationData.assets.length;
14965                    for(i=0;i<len;i+=1){
14966                        if(animationData.assets[i].layers){
14967                            iterateLayers(animationData.assets[i].layers);
14968
14969                        }
14970                    }
14971                }
14972            }
14973        };
14974    }());
14975
14976    function completeData(animationData, fontManager){
14977        if(animationData.__complete){
14978            return;
14979        }
14980        checkColors(animationData);
14981        checkText(animationData);
14982        checkChars(animationData);
14983        checkShapes(animationData);
14984        completeLayers(animationData.layers, animationData.assets, fontManager);
14985        animationData.__complete = true;
14986        //blitAnimation(animationData, animationData.assets, fontManager);
14987    }
14988
14989    function completeText(data, fontManager){
14990        if(data.t.a.length === 0 && !('m' in data.t.p)){
14991            data.singleShape = true;
14992        }
14993    }
14994
14995    var moduleOb = {};
14996    moduleOb.completeData = completeData;
14997
14998    return moduleOb;
14999}
15000
15001var dataManager = dataFunctionManager();
15002var FontManager = (function(){
15003
15004    var maxWaitingTime = 5000;
15005    var emptyChar = {
15006        w: 0,
15007        size:0,
15008        shapes:[]
15009    };
15010    var combinedCharacters = [];
15011    //Hindi characters
15012    combinedCharacters = combinedCharacters.concat([2304, 2305, 2306, 2307, 2362, 2363, 2364, 2364, 2366
15013    , 2367, 2368, 2369, 2370, 2371, 2372, 2373, 2374, 2375, 2376, 2377, 2378, 2379
15014    , 2380, 2381, 2382, 2383, 2387, 2388, 2389, 2390, 2391, 2402, 2403]);
15015
15016    function setUpNode(font, family){
15017        var parentNode = createTag('span');
15018        parentNode.style.fontFamily    = family;
15019        var node = createTag('span');
15020        // Characters that vary significantly among different fonts
15021        node.innerHTML = 'giItT1WQy@!-/#';
15022        // Visible - so we can measure it - but not on the screen
15023        parentNode.style.position      = 'absolute';
15024        parentNode.style.left          = '-10000px';
15025        parentNode.style.top           = '-10000px';
15026        // Large font size makes even subtle changes obvious
15027        parentNode.style.fontSize      = '300px';
15028        // Reset any font properties
15029        parentNode.style.fontVariant   = 'normal';
15030        parentNode.style.fontStyle     = 'normal';
15031        parentNode.style.fontWeight    = 'normal';
15032        parentNode.style.letterSpacing = '0';
15033        parentNode.appendChild(node);
15034        document.body.appendChild(parentNode);
15035
15036        // Remember width with no applied web font
15037        var width = node.offsetWidth;
15038        node.style.fontFamily = font + ', '+family;
15039        return {node:node, w:width, parent:parentNode};
15040    }
15041
15042    function checkLoadedFonts() {
15043        var i, len = this.fonts.length;
15044        var node, w;
15045        var loadedCount = len;
15046        for(i=0;i<len; i+= 1){
15047            if(this.fonts[i].loaded){
15048                loadedCount -= 1;
vendor: 11,356 bytes, lines 15049-15345
15049                continue;
15050            }
15051            if(this.fonts[i].fOrigin === 'n' || this.fonts[i].origin === 0){
15052                this.fonts[i].loaded = true;
15053            } else{
15054                node = this.fonts[i].monoCase.node;
15055                w = this.fonts[i].monoCase.w;
15056                if(node.offsetWidth !== w){
15057                    loadedCount -= 1;
15058                    this.fonts[i].loaded = true;
15059                }else{
15060                    node = this.fonts[i].sansCase.node;
15061                    w = this.fonts[i].sansCase.w;
15062                    if(node.offsetWidth !== w){
15063                        loadedCount -= 1;
15064                        this.fonts[i].loaded = true;
15065                    }
15066                }
15067                if(this.fonts[i].loaded){
15068                    this.fonts[i].sansCase.parent.parentNode.removeChild(this.fonts[i].sansCase.parent);
15069                    this.fonts[i].monoCase.parent.parentNode.removeChild(this.fonts[i].monoCase.parent);
15070                }
15071            }
15072        }
15073
15074        if(loadedCount !== 0 && Date.now() - this.initTime < maxWaitingTime){
15075            setTimeout(this.checkLoadedFonts.bind(this),20);
15076        }else{
15077            setTimeout(function(){this.isLoaded = true;}.bind(this),0);
15078
15079        }
15080    }
15081
15082    function createHelper(def, fontData){
15083        var tHelper = createNS('text');
15084        tHelper.style.fontSize = '100px';
15085        //tHelper.style.fontFamily = fontData.fFamily;
15086        tHelper.setAttribute('font-family', fontData.fFamily);
15087        tHelper.setAttribute('font-style', fontData.fStyle);
15088        tHelper.setAttribute('font-weight', fontData.fWeight);
15089        tHelper.textContent = '1';
15090        if(fontData.fClass){
15091            tHelper.style.fontFamily = 'inherit';
15092            tHelper.setAttribute('class', fontData.fClass);
15093        } else {
15094            tHelper.style.fontFamily = fontData.fFamily;
15095        }
15096        def.appendChild(tHelper);
15097        var tCanvasHelper = createTag('canvas').getContext('2d');
15098        tCanvasHelper.font = fontData.fWeight + ' ' + fontData.fStyle + ' 100px '+ fontData.fFamily;
15099        //tCanvasHelper.font = ' 100px '+ fontData.fFamily;
15100        return tHelper;
15101    }
15102
15103    function addFonts(fontData, defs){
15104        if(!fontData){
15105            this.isLoaded = true;
15106            return;
15107        }
15108        if(this.chars){
15109            this.isLoaded = true;
15110            this.fonts = fontData.list;
15111            return;
15112        }
15113
15114
15115        var fontArr = fontData.list;
15116        var i, len = fontArr.length;
15117        var _pendingFonts = len;
15118        for(i=0; i<len; i+= 1){
15119            var shouldLoadFont = true;
15120            var loadedSelector;
15121            var j;
15122            fontArr[i].loaded = false;
15123            fontArr[i].monoCase = setUpNode(fontArr[i].fFamily,'monospace');
15124            fontArr[i].sansCase = setUpNode(fontArr[i].fFamily,'sans-serif');
15125            if(!fontArr[i].fPath) {
15126                fontArr[i].loaded = true;
15127                _pendingFonts -= 1;
15128            }else if(fontArr[i].fOrigin === 'p' || fontArr[i].origin === 3){
15129                loadedSelector = document.querySelectorAll('style[f-forigin="p"][f-family="'+ fontArr[i].fFamily +'"], style[f-origin="3"][f-family="'+ fontArr[i].fFamily +'"]');
15130
15131                if (loadedSelector.length > 0) {
15132                    shouldLoadFont = false;
15133                }
15134
15135                if (shouldLoadFont) {
15136                    var s = createTag('style');
15137                    s.setAttribute('f-forigin', fontArr[i].fOrigin);
15138                    s.setAttribute('f-origin', fontArr[i].origin);
15139                    s.setAttribute('f-family', fontArr[i].fFamily);
15140                    s.type = "text/css";
15141                    s.innerHTML = "@font-face {" + "font-family: "+fontArr[i].fFamily+"; font-style: normal; src: url('"+fontArr[i].fPath+"');}";
15142                    defs.appendChild(s);
15143                }
15144            } else if(fontArr[i].fOrigin === 'g' || fontArr[i].origin === 1){
15145                loadedSelector = document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]');
15146
15147                for (j = 0; j < loadedSelector.length; j++) {
15148                    if (loadedSelector[j].href.indexOf(fontArr[i].fPath) !== -1) {
15149                        // Font is already loaded
15150                        shouldLoadFont = false;
15151                    }
15152                }
15153
15154                if (shouldLoadFont) {
15155                    var l = createTag('link');
15156                    l.setAttribute('f-forigin', fontArr[i].fOrigin);
15157                    l.setAttribute('f-origin', fontArr[i].origin);
15158                    l.type = "text/css";
15159                    l.rel = "stylesheet";
15160                    l.href = fontArr[i].fPath;
15161                    document.body.appendChild(l);
15162                }
15163            } else if(fontArr[i].fOrigin === 't' || fontArr[i].origin === 2){
15164                loadedSelector = document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]');
15165
15166                for (j = 0; j < loadedSelector.length; j++) {
15167                    if (fontArr[i].fPath === loadedSelector[j].src) {
15168                        // Font is already loaded
15169                        shouldLoadFont = false;
15170                    }
15171                }
15172
15173                if (shouldLoadFont) {
15174                    var sc = createTag('link');
15175                    sc.setAttribute('f-forigin', fontArr[i].fOrigin);
15176                    sc.setAttribute('f-origin', fontArr[i].origin);
15177                    sc.setAttribute('rel','stylesheet');
15178                    sc.setAttribute('href',fontArr[i].fPath);
15179                    defs.appendChild(sc);
15180                }
15181            }
15182            fontArr[i].helper = createHelper(defs,fontArr[i]);
15183            fontArr[i].cache = {};
15184            this.fonts.push(fontArr[i]);
15185        }
15186        if (_pendingFonts === 0) {
15187            this.isLoaded = true;
15188        } else {
15189            //On some cases even if the font is loaded, it won't load correctly when measuring text on canvas.
15190            //Adding this timeout seems to fix it
15191           setTimeout(this.checkLoadedFonts.bind(this), 100);
15192        }
15193    }
15194
15195    function addChars(chars){
15196        if(!chars){
15197            return;
15198        }
15199        if(!this.chars){
15200            this.chars = [];
15201        }
15202        var i, len = chars.length;
15203        var j, jLen = this.chars.length, found;
15204        for(i=0;i<len;i+=1){
15205            j = 0;
15206            found = false;
15207            while(j<jLen){
15208                if(this.chars[j].style === chars[i].style && this.chars[j].fFamily === chars[i].fFamily && this.chars[j].ch === chars[i].ch){
15209                    found = true;
15210                }
15211                j += 1;
15212            }
15213            if(!found){
15214                this.chars.push(chars[i]);
15215                jLen += 1;
15216            }
15217        }
15218    }
15219
15220    function getCharData(char, style, font){
15221        var i = 0, len = this.chars.length;
15222        while( i < len) {
15223            if(this.chars[i].ch === char && this.chars[i].style === style && this.chars[i].fFamily === font){
15224
15225                return this.chars[i];
15226            }
15227            i+= 1;
15228        }
15229        if((typeof char === 'string' && char.charCodeAt(0) !== 13 || !char) && console && console.warn) {
15230            console.warn('Missing character from exported characters list: ', char, style, font);
15231        }
15232        return emptyChar;
15233    }
15234
15235    function measureText(char, fontName, size) {
15236        var fontData = this.getFontByName(fontName);
15237        var index = char.charCodeAt(0);
15238        if(!fontData.cache[index + 1]) {
15239            var tHelper = fontData.helper;
15240            //Canvas version
15241            //fontData.cache[index] = tHelper.measureText(char).width / 100;
15242            //SVG version
15243            //console.log(tHelper.getBBox().width)
15244            if (char === ' ') {
15245                tHelper.textContent = '|' + char + '|';
15246                var doubleSize = tHelper.getComputedTextLength();
15247                tHelper.textContent = '||';
15248                var singleSize = tHelper.getComputedTextLength();
15249                fontData.cache[index + 1] = (doubleSize - singleSize)/100;
15250            } else {
15251                tHelper.textContent = char;
15252                fontData.cache[index + 1] = (tHelper.getComputedTextLength())/100;
15253            }
15254        }
15255        return fontData.cache[index + 1] * size;
15256    }
15257
15258    function getFontByName(name){
15259        var i = 0, len = this.fonts.length;
15260        while(i<len){
15261            if(this.fonts[i].fName === name) {
15262                return this.fonts[i];
15263            }
15264            i += 1;
15265        }
15266        return this.fonts[0];
15267    }
15268
15269    function getCombinedCharacterCodes() {
15270        return combinedCharacters;
15271    }
15272
15273    function loaded() {
15274        return this.isLoaded;
15275    }
15276
15277    var Font = function(){
15278        this.fonts = [];
15279        this.chars = null;
15280        this.typekitLoaded = 0;
15281        this.isLoaded = false;
15282        this.initTime = Date.now();
15283    };
15284    //TODO: for now I'm adding these methods to the Class and not the prototype. Think of a better way to implement it. 
15285    Font.getCombinedCharacterCodes = getCombinedCharacterCodes;
15286
15287    Font.prototype.addChars = addChars;
15288    Font.prototype.addFonts = addFonts;
15289    Font.prototype.getCharData = getCharData;
15290    Font.prototype.getFontByName = getFontByName;
15291    Font.prototype.measureText = measureText;
15292    Font.prototype.checkLoadedFonts = checkLoadedFonts;
15293    Font.prototype.loaded = loaded;
15294
15295    return Font;
15296
15297}());
15298var PropertyFactory = (function(){
15299
15300    var initFrame = initialDefaultFrame;
15301    var math_abs = Math.abs;
15302
15303    function interpolateValue(frameNum, caching) {
15304        var offsetTime = this.offsetTime;
15305        var newValue;
15306        if (this.propType === 'multidimensional') {
15307            newValue = createTypedArray('float32', this.pv.length);
15308        }
15309        var iterationIndex = caching.lastIndex;
15310        var i = iterationIndex;
15311        var len = this.keyframes.length - 1, flag = true;
15312        var keyData, nextKeyData;
15313
15314        while (flag) {
15315            keyData = this.keyframes[i];
15316            nextKeyData = this.keyframes[i + 1];
15317            if (i === len - 1 && frameNum >= nextKeyData.t - offsetTime){
15318                if(keyData.h){
15319                    keyData = nextKeyData;
15320                }
15321                iterationIndex = 0;
15322                break;
15323            }
15324            if ((nextKeyData.t - offsetTime) > frameNum){
15325                iterationIndex = i;
15326                break;
15327            }
15328            if (i < len - 1){
15329                i += 1;
15330            } else {
15331                iterationIndex = 0;
15332                flag = false;
15333            }
15334        }
15335
15336        var k, kLen, perc, jLen, j, fnc;
15337        var nextKeyTime = nextKeyData.t - offsetTime;
15338        var keyTime = keyData.t - offsetTime;
15339        var endValue;
15340        if (keyData.to) {
15341            if (!keyData.bezierData) {
15342                keyData.bezierData = bez.buildBezierData(keyData.s, nextKeyData.s || keyData.e, keyData.to, keyData.ti);
15343            }
15344            var bezierData = keyData.bezierData;
15345            if (frameNum >
vendor: 12,292 bytes, lines 15345-15633
15345= nextKeyTime || frameNum < keyTime) {
15346                var ind = frameNum >= nextKeyTime ? bezierData.points.length - 1 : 0;
15347                kLen = bezierData.points[ind].point.length;
15348                for (k = 0; k < kLen; k += 1) {
15349                    newValue[k] = bezierData.points[ind].point[k];
15350                }
15351                // caching._lastKeyframeIndex = -1;
15352            } else {
15353                if (keyData.__fnct) {
15354                    fnc = keyData.__fnct;
15355                } else {
15356                    fnc = BezierFactory.getBezierEasing(keyData.o.x, keyData.o.y, keyData.i.x, keyData.i.y, keyData.n).get;
15357                    keyData.__fnct = fnc;
15358                }
15359                perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime));
15360                var distanceInLine = bezierData.segmentLength*perc;
15361
15362                var segmentPerc;
15363                var addedLength =  (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastAddedLength : 0;
15364                j =  (caching.lastFrame < frameNum && caching._lastKeyframeIndex === i) ? caching._lastPoint : 0;
15365                flag = true;
15366                jLen = bezierData.points.length;
15367                while (flag) {
15368                    addedLength += bezierData.points[j].partialLength;
15369                    if (distanceInLine === 0 || perc === 0 || j === bezierData.points.length - 1) {
15370                        kLen = bezierData.points[j].point.length;
15371                        for (k = 0; k < kLen; k += 1) {
15372                            newValue[k] = bezierData.points[j].point[k];
15373                        }
15374                        break;
15375                    } else if (distanceInLine >= addedLength && distanceInLine < addedLength + bezierData.points[j + 1].partialLength) {
15376                        segmentPerc = (distanceInLine - addedLength) / bezierData.points[j + 1].partialLength;
15377                        kLen = bezierData.points[j].point.length;
15378                        for (k = 0; k < kLen; k += 1) {
15379                            newValue[k] = bezierData.points[j].point[k] + (bezierData.points[j + 1].point[k] - bezierData.points[j].point[k]) * segmentPerc;
15380                        }
15381                        break;
15382                    }
15383                    if (j < jLen - 1){
15384                        j += 1;
15385                    } else {
15386                        flag = false;
15387                    }
15388                }
15389                caching._lastPoint = j;
15390                caching._lastAddedLength = addedLength - bezierData.points[j].partialLength;
15391                caching._lastKeyframeIndex = i;
15392            }
15393        } else {
15394            var outX, outY, inX, inY, keyValue;
15395            len = keyData.s.length;
15396            endValue = nextKeyData.s || keyData.e;
15397            if (this.sh && keyData.h !== 1) {
15398                if (frameNum >= nextKeyTime) {
15399                    newValue[0] = endValue[0];
15400                    newValue[1] = endValue[1];
15401                    newValue[2] = endValue[2];
15402                } else if (frameNum <= keyTime) {
15403                    newValue[0] = keyData.s[0];
15404                    newValue[1] = keyData.s[1];
15405                    newValue[2] = keyData.s[2];
15406                } else {
15407                    var quatStart = createQuaternion(keyData.s);
15408                    var quatEnd = createQuaternion(endValue);
15409                    var time = (frameNum - keyTime) / (nextKeyTime - keyTime);
15410                    quaternionToEuler(newValue, slerp(quatStart, quatEnd, time));
15411                }
15412                
15413            } else {
15414                for(i = 0; i < len; i += 1) {
15415                    if (keyData.h !== 1) {
15416                        if (frameNum >= nextKeyTime) {
15417                            perc = 1;
15418                        } else if(frameNum < keyTime) {
15419                            perc = 0;
15420                        } else {
15421                            if(keyData.o.x.constructor === Array) {
15422                                if (!keyData.__fnct) {
15423                                    keyData.__fnct = [];
15424                                }
15425                                if (!keyData.__fnct[i]) {
15426                                    outX = (typeof keyData.o.x[i] === 'undefined') ? keyData.o.x[0] : keyData.o.x[i];
15427                                    outY = (typeof keyData.o.y[i] === 'undefined') ? keyData.o.y[0] : keyData.o.y[i];
15428                                    inX = (typeof keyData.i.x[i] === 'undefined') ? keyData.i.x[0] : keyData.i.x[i];
15429                                    inY = (typeof keyData.i.y[i] === 'undefined') ? keyData.i.y[0] : keyData.i.y[i];
15430                                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
15431                                    keyData.__fnct[i] = fnc;
15432                                } else {
15433                                    fnc = keyData.__fnct[i];
15434                                }
15435                            } else {
15436                                if (!keyData.__fnct) {
15437                                    outX = keyData.o.x;
15438                                    outY = keyData.o.y;
15439                                    inX = keyData.i.x;
15440                                    inY = keyData.i.y;
15441                                    fnc = BezierFactory.getBezierEasing(outX, outY, inX, inY).get;
15442                                    keyData.__fnct = fnc;
15443                                } else {
15444                                    fnc = keyData.__fnct;
15445                                }
15446                            }
15447                            perc = fnc((frameNum - keyTime) / (nextKeyTime - keyTime ));
15448                        }
15449                    }
15450
15451                    endValue = nextKeyData.s || keyData.e;
15452                    keyValue = keyData.h === 1 ? keyData.s[i] : keyData.s[i] + (endValue[i] - keyData.s[i]) * perc;
15453
15454                    if (this.propType === 'multidimensional') {
15455                        newValue[i] = keyValue;
15456                    } else {
15457                        newValue = keyValue;
15458                    }
15459                }
15460            }
15461        }
15462        caching.lastIndex = iterationIndex;
15463        return newValue;
15464    }
15465
15466    //based on @Toji's https://github.com/toji/gl-matrix/
15467    function slerp(a, b, t) {
15468        var out = [];
15469        var ax = a[0], ay = a[1], az = a[2], aw = a[3],
15470        bx = b[0], by = b[1], bz = b[2], bw = b[3]
15471
15472        var omega, cosom, sinom, scale0, scale1;
15473
15474        cosom = ax * bx + ay * by + az * bz + aw * bw;
15475        if (cosom < 0.0) {
15476            cosom = -cosom;
15477            bx = -bx;
15478            by = -by;
15479            bz = -bz;
15480            bw = -bw;
15481        }
15482        if ((1.0 - cosom) > 0.000001) {
15483            omega = Math.acos(cosom);
15484            sinom = Math.sin(omega);
15485            scale0 = Math.sin((1.0 - t) * omega) / sinom;
15486            scale1 = Math.sin(t * omega) / sinom;
15487        } else {
15488            scale0 = 1.0 - t;
15489            scale1 = t;
15490        }
15491        out[0] = scale0 * ax + scale1 * bx;
15492        out[1] = scale0 * ay + scale1 * by;
15493        out[2] = scale0 * az + scale1 * bz;
15494        out[3] = scale0 * aw + scale1 * bw;
15495
15496        return out;
15497    }
15498
15499    function quaternionToEuler(out, quat) {
15500        var qx = quat[0];
15501        var qy = quat[1];
15502        var qz = quat[2];
15503        var qw = quat[3];
15504        var heading = Math.atan2(2*qy*qw-2*qx*qz , 1 - 2*qy*qy - 2*qz*qz)
15505        var attitude = Math.asin(2*qx*qy + 2*qz*qw) 
15506        var bank = Math.atan2(2*qx*qw-2*qy*qz , 1 - 2*qx*qx - 2*qz*qz);
15507        out[0] = heading/degToRads;
15508        out[1] = attitude/degToRads;
15509        out[2] = bank/degToRads;
15510    }
15511
15512    function createQuaternion(values) {
15513        var heading = values[0] * degToRads;
15514        var attitude = values[1] * degToRads;
15515        var bank = values[2] * degToRads;
15516        var c1 = Math.cos(heading / 2);
15517        var c2 = Math.cos(attitude / 2);
15518        var c3 = Math.cos(bank / 2);
15519        var s1 = Math.sin(heading / 2);
15520        var s2 = Math.sin(attitude / 2);
15521        var s3 = Math.sin(bank / 2);
15522        var w = c1 * c2 * c3 - s1 * s2 * s3;
15523        var x = s1 * s2 * c3 + c1 * c2 * s3;
15524        var y = s1 * c2 * c3 + c1 * s2 * s3;
15525        var z = c1 * s2 * c3 - s1 * c2 * s3;
15526
15527        return [x,y,z,w];
15528    }
15529
15530    function getValueAtCurrentTime(){
15531        var frameNum = this.comp.renderedFrame - this.offsetTime;
15532        var initTime = this.keyframes[0].t - this.offsetTime;
15533        var endTime = this.keyframes[this.keyframes.length- 1].t-this.offsetTime;
15534        if(!(frameNum === this._caching.lastFrame || (this._caching.lastFrame !== initFrame && ((this._caching.lastFrame >= endTime && frameNum >= endTime) || (this._caching.lastFrame < initTime && frameNum < initTime))))){
15535            if(this._caching.lastFrame >= frameNum) {
15536                this._caching._lastKeyframeIndex = -1;
15537                this._caching.lastIndex = 0;
15538            }
15539
15540            var renderResult = this.interpolateValue(frameNum, this._caching);
15541            this.pv = renderResult;
15542        }
15543        this._caching.lastFrame = frameNum;
15544        return this.pv;
15545    }
15546
15547    function setVValue(val) {
15548        var multipliedValue;
15549        if(this.propType === 'unidimensional') {
15550            multipliedValue = val * this.mult;
15551            if(math_abs(this.v - multipliedValue) > 0.00001) {
15552                this.v = multipliedValue;
15553                this._mdf = true;
15554            }
15555        } else {
15556            var i = 0, len = this.v.length;
15557            while (i < len) {
15558                multipliedValue = val[i] * this.mult;
15559                if (math_abs(this.v[i] - multipliedValue) > 0.00001) {
15560                    this.v[i] = multipliedValue;
15561                    this._mdf = true;
15562                }
15563                i += 1;
15564            }
15565        }
15566    }
15567
15568    function processEffectsSequence() {
15569        if (this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) {
15570            return;
15571        }
15572        if(this.lock) {
15573            this.setVValue(this.pv);
15574            return;
15575        }
15576        this.lock = true;
15577        this._mdf = this._isFirstFrame;
15578        var multipliedValue;
15579        var i, len = this.effectsSequence.length;
15580        var finalValue = this.kf ? this.pv : this.data.k;
15581        for(i = 0; i < len; i += 1) {
15582            finalValue = this.effectsSequence[i](finalValue);
15583        }
15584        this.setVValue(finalValue);
15585        this._isFirstFrame = false;
15586        this.lock = false;
15587        this.frameId = this.elem.globalData.frameId;
15588    }
15589
15590    function addEffect(effectFunction) {
15591        this.effectsSequence.push(effectFunction);
15592        this.container.addDynamicProperty(this);
15593    }
15594
15595    function ValueProperty(elem, data, mult, container){
15596        this.propType = 'unidimensional';
15597        this.mult = mult || 1;
15598        this.data = data;
15599        this.v = mult ? data.k * mult : data.k;
15600        this.pv = data.k;
15601        this._mdf = false;
15602        this.elem = elem;
15603        this.container = container;
15604        this.comp = elem.comp;
15605        this.k = false;
15606        this.kf = false;
15607        this.vel = 0;
15608        this.effectsSequence = [];
15609        this._isFirstFrame = true;
15610        this.getValue = processEffectsSequence;
15611        this.setVValue = setVValue;
15612        this.addEffect = addEffect;
15613    }
15614
15615    function MultiDimensionalProperty(elem, data, mult, container) {
15616        this.propType = 'multidimensional';
15617        this.mult = mult || 1;
15618        this.data = data;
15619        this._mdf = false;
15620        this.elem = elem;
15621        this.container = container;
15622        this.comp = elem.comp;
15623        this.k = false;
15624        this.kf = false;
15625        this.frameId = -1;
15626        var i, len = data.k.length;
15627        this.v = createTypedArray('float32', len);
15628        this.pv = createTypedArray('float32', len);
15629        var arr = createTypedArray('float32', len);
15630        this.vel = createTypedArray('float32', len);
15631        for (i = 0; i < len; i += 1) {
15632            this.v[i] = data.k[i] * this.mult;
15633            this.pv[i] = data.k[i];
vendor: 42,975 bytes, lines 15634-16693
15634        }
15635        this._isFirstFrame = true;
15636        this.effectsSequence = [];
15637        this.getValue = processEffectsSequence;
15638        this.setVValue = setVValue;
15639        this.addEffect = addEffect;
15640    }
15641
15642    function KeyframedValueProperty(elem, data, mult, container) {
15643        this.propType = 'unidimensional';
15644        this.keyframes = data.k;
15645        this.offsetTime = elem.data.st;
15646        this.frameId = -1;
15647        this._caching = {lastFrame: initFrame, lastIndex: 0, value: 0, _lastKeyframeIndex: -1};
15648        this.k = true;
15649        this.kf = true;
15650        this.data = data;
15651        this.mult = mult || 1;
15652        this.elem = elem;
15653        this.container = container;
15654        this.comp = elem.comp;
15655        this.v = initFrame;
15656        this.pv = initFrame;
15657        this._isFirstFrame = true;
15658        this.getValue = processEffectsSequence;
15659        this.setVValue = setVValue;
15660        this.interpolateValue = interpolateValue;
15661        this.effectsSequence = [getValueAtCurrentTime.bind(this)];
15662        this.addEffect = addEffect;
15663    }
15664
15665    function KeyframedMultidimensionalProperty(elem, data, mult, container){
15666        this.propType = 'multidimensional';
15667        var i, len = data.k.length;
15668        var s, e,to,ti;
15669        for (i = 0; i < len - 1; i += 1) {
15670            if (data.k[i].to && data.k[i].s && data.k[i].e) {
15671                s = data.k[i].s;
15672                e = data.k[i].e;
15673                to = data.k[i].to;
15674                ti = data.k[i].ti;
15675                if((s.length === 2 && !(s[0] === e[0] && s[1] === e[1]) && bez.pointOnLine2D(s[0],s[1],e[0],e[1],s[0] + to[0],s[1] + to[1]) && bez.pointOnLine2D(s[0],s[1],e[0],e[1],e[0] + ti[0],e[1] + ti[1])) || (s.length === 3 && !(s[0] === e[0] && s[1] === e[1] && s[2] === e[2]) && bez.pointOnLine3D(s[0],s[1],s[2],e[0],e[1],e[2],s[0] + to[0],s[1] + to[1],s[2] + to[2]) && bez.pointOnLine3D(s[0],s[1],s[2],e[0],e[1],e[2],e[0] + ti[0],e[1] + ti[1],e[2] + ti[2]))){
15676                    data.k[i].to = null;
15677                    data.k[i].ti = null;
15678                }
15679                if(s[0] === e[0] && s[1] === e[1] && to[0] === 0 && to[1] === 0 && ti[0] === 0 && ti[1] === 0) {
15680                    if(s.length === 2 || (s[2] === e[2] && to[2] === 0 && ti[2] === 0)) {
15681                        data.k[i].to = null;
15682                        data.k[i].ti = null;
15683                    }
15684                }
15685            }
15686        }
15687        this.effectsSequence = [getValueAtCurrentTime.bind(this)];
15688        this.keyframes = data.k;
15689        this.offsetTime = elem.data.st;
15690        this.k = true;
15691        this.kf = true;
15692        this._isFirstFrame = true;
15693        this.mult = mult || 1;
15694        this.elem = elem;
15695        this.container = container;
15696        this.comp = elem.comp;
15697        this.getValue = processEffectsSequence;
15698        this.setVValue = setVValue;
15699        this.interpolateValue = interpolateValue;
15700        this.frameId = -1;
15701        var arrLen = data.k[0].s.length;
15702        this.v = createTypedArray('float32', arrLen);
15703        this.pv = createTypedArray('float32', arrLen);
15704        for (i = 0; i < arrLen; i += 1) {
15705            this.v[i] = initFrame;
15706            this.pv[i] = initFrame;
15707        }
15708        this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray('float32', arrLen)};
15709        this.addEffect = addEffect;
15710    }
15711
15712    function getProp(elem,data,type, mult, container) {
15713        var p;
15714        if(!data.k.length){
15715            p = new ValueProperty(elem,data, mult, container);
15716        }else if(typeof(data.k[0]) === 'number'){
15717            p = new MultiDimensionalProperty(elem,data, mult, container);
15718        }else{
15719            switch(type){
15720                case 0:
15721                    p = new KeyframedValueProperty(elem,data,mult, container);
15722                    break;
15723                case 1:
15724                    p = new KeyframedMultidimensionalProperty(elem,data,mult, container);
15725                    break;
15726            }
15727        }
15728        if(p.effectsSequence.length){
15729            container.addDynamicProperty(p);
15730        }
15731        return p;
15732    }
15733
15734    var ob = {
15735        getProp: getProp
15736    };
15737    return ob;
15738}());
15739var TransformPropertyFactory = (function() {
15740
15741    function applyToMatrix(mat) {
15742        var _mdf = this._mdf;
15743        this.iterateDynamicProperties();
15744        this._mdf = this._mdf || _mdf;
15745        if (this.a) {
15746            mat.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
15747        }
15748        if (this.s) {
15749            mat.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
15750        }
15751        if (this.sk) {
15752            mat.skewFromAxis(-this.sk.v, this.sa.v);
15753        }
15754        if (this.r) {
15755            mat.rotate(-this.r.v);
15756        } else {
15757            mat.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);
15758        }
15759        if (this.data.p.s) {
15760            if (this.data.p.z) {
15761                mat.translate(this.px.v, this.py.v, -this.pz.v);
15762            } else {
15763                mat.translate(this.px.v, this.py.v, 0);
15764            }
15765        } else {
15766            mat.translate(this.p.v[0], this.p.v[1], -this.p.v[2]);
15767        }
15768    }
15769    function processKeys(forceRender){
15770        if (this.elem.globalData.frameId === this.frameId) {
15771            return;
15772        }
15773        if(this._isDirty) {
15774            this.precalculateMatrix();
15775            this._isDirty = false;
15776        }
15777
15778        this.iterateDynamicProperties();
15779
15780        if (this._mdf || forceRender) {
15781            this.v.cloneFromProps(this.pre.props);
15782            if (this.appliedTransformations < 1) {
15783                this.v.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
15784            }
15785            if(this.appliedTransformations < 2) {
15786                this.v.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
15787            }
15788            if (this.sk && this.appliedTransformations < 3) {
15789                this.v.skewFromAxis(-this.sk.v, this.sa.v);
15790            }
15791            if (this.r && this.appliedTransformations < 4) {
15792                this.v.rotate(-this.r.v);
15793            } else if (!this.r && this.appliedTransformations < 4){
15794                this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);
15795            }
15796            if (this.autoOriented) {
15797                var v1,v2, frameRate = this.elem.globalData.frameRate;
15798                if(this.p && this.p.keyframes && this.p.getValueAtTime) {
15799                    if (this.p._caching.lastFrame+this.p.offsetTime <= this.p.keyframes[0].t) {
15800                        v1 = this.p.getValueAtTime((this.p.keyframes[0].t + 0.01) / frameRate,0);
15801                        v2 = this.p.getValueAtTime(this.p.keyframes[0].t / frameRate, 0);
15802                    } else if(this.p._caching.lastFrame+this.p.offsetTime >= this.p.keyframes[this.p.keyframes.length - 1].t) {
15803                        v1 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t / frameRate), 0);
15804                        v2 = this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length - 1].t - 0.05) / frameRate, 0);
15805                    } else {
15806                        v1 = this.p.pv;
15807                        v2 = this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime - 0.01) / frameRate, this.p.offsetTime);
15808                    }
15809                } else if(this.px && this.px.keyframes && this.py.keyframes && this.px.getValueAtTime && this.py.getValueAtTime) {
15810                    v1 = [];
15811                    v2 = [];
15812                    var px = this.px, py = this.py, frameRate;
15813                    if (px._caching.lastFrame+px.offsetTime <= px.keyframes[0].t) {
15814                        v1[0] = px.getValueAtTime((px.keyframes[0].t + 0.01) / frameRate,0);
15815                        v1[1] = py.getValueAtTime((py.keyframes[0].t + 0.01) / frameRate,0);
15816                        v2[0] = px.getValueAtTime((px.keyframes[0].t) / frameRate,0);
15817                        v2[1] = py.getValueAtTime((py.keyframes[0].t) / frameRate,0);
15818                    } else if(px._caching.lastFrame+px.offsetTime >= px.keyframes[px.keyframes.length - 1].t) {
15819                        v1[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t / frameRate),0);
15820                        v1[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t / frameRate),0);
15821                        v2[0] = px.getValueAtTime((px.keyframes[px.keyframes.length - 1].t - 0.01) / frameRate,0);
15822                        v2[1] = py.getValueAtTime((py.keyframes[py.keyframes.length - 1].t - 0.01) / frameRate,0);
15823                    } else {
15824                        v1 = [px.pv, py.pv];
15825                        v2[0] = px.getValueAtTime((px._caching.lastFrame+px.offsetTime - 0.01) / frameRate,px.offsetTime);
15826                        v2[1] = py.getValueAtTime((py._caching.lastFrame+py.offsetTime - 0.01) / frameRate,py.offsetTime);
15827                    }
15828                }
15829                this.v.rotate(-Math.atan2(v1[1] - v2[1], v1[0] - v2[0]));
15830            }
15831            if(this.data.p && this.data.p.s){
15832                if(this.data.p.z) {
15833                    this.v.translate(this.px.v, this.py.v, -this.pz.v);
15834                } else {
15835                    this.v.translate(this.px.v, this.py.v, 0);
15836                }
15837            }else{
15838                this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2]);
15839            }
15840        }
15841        this.frameId = this.elem.globalData.frameId;
15842    }
15843
15844    function precalculateMatrix() {
15845        if(!this.a.k) {
15846            this.pre.translate(-this.a.v[0], -this.a.v[1], this.a.v[2]);
15847            this.appliedTransformations = 1;
15848        } else {
15849            return;
15850        }
15851        if(!this.s.effectsSequence.length) {
15852            this.pre.scale(this.s.v[0], this.s.v[1], this.s.v[2]);
15853            this.appliedTransformations = 2;
15854        } else {
15855            return;
15856        }
15857        if(this.sk) {
15858            if(!this.sk.effectsSequence.length && !this.sa.effectsSequence.length) {
15859                this.pre.skewFromAxis(-this.sk.v, this.sa.v);
15860            this.appliedTransformations = 3;
15861            } else {
15862                return;
15863            }
15864        }
15865        if (this.r) {
15866            if(!this.r.effectsSequence.length) {
15867                this.pre.rotate(-this.r.v);
15868                this.appliedTransformations = 4;
15869            } else {
15870                return;
15871            }
15872        } else if(!this.rz.effectsSequence.length && !this.ry.effectsSequence.length && !this.rx.effectsSequence.length && !this.or.effectsSequence.length) {
15873            this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]);
15874            this.appliedTransformations = 4;
15875        }
15876    }
15877
15878    function autoOrient(){
15879        //
15880        //var prevP = this.getValueAtTime();
15881    }
15882
15883    function addDynamicProperty(prop) {
15884        this._addDynamicProperty(prop);
15885        this.elem.addDynamicProperty(prop);
15886        this._isDirty = true;
15887    }
15888
15889    function TransformProperty(elem,data,container){
15890        this.elem = elem;
15891        this.frameId = -1;
15892        this.propType = 'transform';
15893        this.data = data;
15894        this.v = new Matrix();
15895        //Precalculated matrix with non animated properties
15896        this.pre = new Matrix();
15897        this.appliedTransformations = 0;
15898        this.initDynamicPropertyContainer(container || elem);
15899        if(data.p && data.p.s){
15900            this.px = PropertyFactory.getProp(elem,data.p.x,0,0,this);
15901            this.py = PropertyFactory.getProp(elem,data.p.y,0,0,this);
15902            if(data.p.z){
15903                this.pz = PropertyFactory.getProp(elem,data.p.z,0,0,this);
15904            }
15905        }else{
15906            this.p = PropertyFactory.getProp(elem,data.p || {k:[0,0,0]},1,0,this);
15907        }
15908        if(data.rx) {
15909            this.rx = PropertyFactory.getProp(elem, data.rx, 0, degToRads, this);
15910            this.ry = PropertyFactory.getProp(elem, data.ry, 0, degToRads, this);
15911            this.rz = PropertyFactory.getProp(elem, data.rz, 0, degToRads, this);
15912            if(data.or.k[0].ti) {
15913                var i, len = data.or.k.length;
15914                for(i=0;i<len;i+=1) {
15915                    data.or.k[i].to = data.or.k[i].ti = null;
15916                }
15917            }
15918            this.or = PropertyFactory.getProp(elem, data.or, 1, degToRads, this);
15919            //sh Indicates it needs to be capped between -180 and 180
15920            this.or.sh = true;
15921        } else {
15922            this.r = PropertyFactory.getProp(elem, data.r || {k: 0}, 0, degToRads, this);
15923        }
15924        if(data.sk){
15925            this.sk = PropertyFactory.getProp(elem, data.sk, 0, degToRads, this);
15926            this.sa = PropertyFactory.getProp(elem, data.sa, 0, degToRads, this);
15927        }
15928        this.a = PropertyFactory.getProp(elem,data.a || {k:[0,0,0]},1,0,this);
15929        this.s = PropertyFactory.getProp(elem,data.s || {k:[100,100,100]},1,0.01,this);
15930        // Opacity is not part of the transform properties, that's why it won't use this.dynamicProperties. That way transforms won't get updated if opacity changes.
15931        if(data.o){
15932            this.o = PropertyFactory.getProp(elem,data.o,0,0.01,elem);
15933        } else {
15934            this.o = {_mdf:false,v:1};
15935        }
15936        this._isDirty = true;
15937        if(!this.dynamicProperties.length){
15938            this.getValue(true);
15939        }
15940    }
15941
15942    TransformProperty.prototype = {
15943        applyToMatrix: applyToMatrix,
15944        getValue: processKeys,
15945        precalculateMatrix: precalculateMatrix,
15946        autoOrient: autoOrient
15947    }
15948
15949    extendPrototype([DynamicPropertyContainer], TransformProperty);
15950    TransformProperty.prototype.addDynamicProperty = addDynamicProperty;
15951    TransformProperty.prototype._addDynamicProperty = DynamicPropertyContainer.prototype.addDynamicProperty;
15952
15953    function getTransformProperty(elem,data,container){
15954        return new TransformProperty(elem,data,container);
15955    }
15956
15957    return {
15958        getTransformProperty: getTransformProperty
15959    };
15960
15961}());
15962function ShapePath(){
15963	this.c = false;
15964	this._length = 0;
15965	this._maxLength = 8;
15966	this.v = createSizedArray(this._maxLength);
15967	this.o = createSizedArray(this._maxLength);
15968	this.i = createSizedArray(this._maxLength);
15969}
15970
15971ShapePath.prototype.setPathData = function(closed, len) {
15972	this.c = closed;
15973	this.setLength(len);
15974	var i = 0;
15975	while(i < len){
15976		this.v[i] = point_pool.newElement();
15977		this.o[i] = point_pool.newElement();
15978		this.i[i] = point_pool.newElement();
15979		i += 1;
15980	}
15981};
15982
15983ShapePath.prototype.setLength = function(len) {
15984	while(this._maxLength < len) {
15985		this.doubleArrayLength();
15986	}
15987	this._length = len;
15988};
15989
15990ShapePath.prototype.doubleArrayLength = function() {
15991	this.v = this.v.concat(createSizedArray(this._maxLength));
15992	this.i = this.i.concat(createSizedArray(this._maxLength));
15993	this.o = this.o.concat(createSizedArray(this._maxLength));
15994	this._maxLength *= 2;
15995};
15996
15997ShapePath.prototype.setXYAt = function(x, y, type, pos, replace) {
15998	var arr;
15999	this._length = Math.max(this._length, pos + 1);
16000	if(this._length >= this._maxLength) {
16001		this.doubleArrayLength();
16002	}
16003	switch(type){
16004		case 'v':
16005			arr = this.v;
16006			break;
16007		case 'i':
16008			arr = this.i;
16009			break;
16010		case 'o':
16011			arr = this.o;
16012			break;
16013	}
16014	if(!arr[pos] || (arr[pos] && !replace)){
16015		arr[pos] = point_pool.newElement();
16016	}
16017	arr[pos][0] = x;
16018	arr[pos][1] = y;
16019};
16020
16021ShapePath.prototype.setTripleAt = function(vX,vY,oX,oY,iX,iY,pos, replace) {
16022	this.setXYAt(vX,vY,'v',pos, replace);
16023	this.setXYAt(oX,oY,'o',pos, replace);
16024	this.setXYAt(iX,iY,'i',pos, replace);
16025};
16026
16027ShapePath.prototype.reverse = function() {
16028	var newPath = new ShapePath();
16029	newPath.setPathData(this.c, this._length);
16030	var vertices = this.v, outPoints = this.o, inPoints = this.i;
16031	var init = 0;
16032	if (this.c) {
16033		newPath.setTripleAt(vertices[0][0], vertices[0][1], inPoints[0][0], inPoints[0][1], outPoints[0][0], outPoints[0][1], 0, false);
16034        init = 1;
16035    }
16036    var cnt = this._length - 1;
16037    var len = this._length;
16038
16039    var i;
16040    for (i = init; i < len; i += 1) {
16041    	newPath.setTripleAt(vertices[cnt][0], vertices[cnt][1], inPoints[cnt][0], inPoints[cnt][1], outPoints[cnt][0], outPoints[cnt][1], i, false);
16042        cnt -= 1;
16043    }
16044    return newPath;
16045};
16046var ShapePropertyFactory = (function(){
16047
16048    var initFrame = -999999;
16049
16050    function interpolateShape(frameNum, previousValue, caching) {
16051        var iterationIndex = caching.lastIndex;
16052        var keyPropS,keyPropE,isHold, j, k, jLen, kLen, perc, vertexValue;
16053        var kf = this.keyframes;
16054        if(frameNum < kf[0].t-this.offsetTime){
16055            keyPropS = kf[0].s[0];
16056            isHold = true;
16057            iterationIndex = 0;
16058        }else if(frameNum >= kf[kf.length - 1].t-this.offsetTime){
16059            keyPropS = kf[kf.length - 1].s ? kf[kf.length - 1].s[0] : kf[kf.length - 2].e[0];
16060            /*if(kf[kf.length - 1].s){
16061                keyPropS = kf[kf.length - 1].s[0];
16062            }else{
16063                keyPropS = kf[kf.length - 2].e[0];
16064            }*/
16065            isHold = true;
16066        }else{
16067            var i = iterationIndex;
16068            var len = kf.length- 1,flag = true,keyData,nextKeyData;
16069            while(flag){
16070                keyData = kf[i];
16071                nextKeyData = kf[i+1];
16072                if((nextKeyData.t - this.offsetTime) > frameNum){
16073                    break;
16074                }
16075                if(i < len - 1){
16076                    i += 1;
16077                }else{
16078                    flag = false;
16079                }
16080            }
16081            isHold = keyData.h === 1;
16082            iterationIndex = i;
16083            if(!isHold){
16084                if(frameNum >= nextKeyData.t-this.offsetTime){
16085                    perc = 1;
16086                }else if(frameNum < keyData.t-this.offsetTime){
16087                    perc = 0;
16088                }else{
16089                    var fnc;
16090                    if(keyData.__fnct){
16091                        fnc = keyData.__fnct;
16092                    }else{
16093                        fnc = BezierFactory.getBezierEasing(keyData.o.x,keyData.o.y,keyData.i.x,keyData.i.y).get;
16094                        keyData.__fnct = fnc;
16095                    }
16096                    perc = fnc((frameNum-(keyData.t-this.offsetTime))/((nextKeyData.t-this.offsetTime)-(keyData.t-this.offsetTime)));
16097                }
16098                keyPropE = nextKeyData.s ? nextKeyData.s[0] : keyData.e[0];
16099            }
16100            keyPropS = keyData.s[0];
16101        }
16102        jLen = previousValue._length;
16103        kLen = keyPropS.i[0].length;
16104        caching.lastIndex = iterationIndex;
16105
16106        for(j=0;j<jLen;j+=1){
16107            for(k=0;k<kLen;k+=1){
16108                vertexValue = isHold ? keyPropS.i[j][k] :  keyPropS.i[j][k]+(keyPropE.i[j][k]-keyPropS.i[j][k])*perc;
16109                previousValue.i[j][k] = vertexValue;
16110                vertexValue = isHold ? keyPropS.o[j][k] :  keyPropS.o[j][k]+(keyPropE.o[j][k]-keyPropS.o[j][k])*perc;
16111                previousValue.o[j][k] = vertexValue;
16112                vertexValue = isHold ? keyPropS.v[j][k] :  keyPropS.v[j][k]+(keyPropE.v[j][k]-keyPropS.v[j][k])*perc;
16113                previousValue.v[j][k] = vertexValue;
16114            }
16115        }
16116    }
16117
16118    function interpolateShapeCurrentTime(){
16119        var frameNum = this.comp.renderedFrame - this.offsetTime;
16120        var initTime = this.keyframes[0].t - this.offsetTime;
16121        var endTime = this.keyframes[this.keyframes.length - 1].t - this.offsetTime;
16122        var lastFrame = this._caching.lastFrame;
16123        if(!(lastFrame !== initFrame && ((lastFrame < initTime && frameNum < initTime) || (lastFrame > endTime && frameNum > endTime)))){
16124            ////
16125            this._caching.lastIndex = lastFrame < frameNum ? this._caching.lastIndex : 0;
16126            this.interpolateShape(frameNum, this.pv, this._caching);
16127            ////
16128        }
16129        this._caching.lastFrame = frameNum;
16130        return this.pv;
16131    }
16132
16133    function resetShape(){
16134        this.paths = this.localShapeCollection;
16135    }
16136
16137    function shapesEqual(shape1, shape2) {
16138        if(shape1._length !== shape2._length || shape1.c !== shape2.c){
16139            return false;
16140        }
16141        var i, len = shape1._length;
16142        for(i = 0; i < len; i += 1) {
16143            if(shape1.v[i][0] !== shape2.v[i][0] 
16144            || shape1.v[i][1] !== shape2.v[i][1] 
16145            || shape1.o[i][0] !== shape2.o[i][0] 
16146            || shape1.o[i][1] !== shape2.o[i][1] 
16147            || shape1.i[i][0] !== shape2.i[i][0] 
16148            || shape1.i[i][1] !== shape2.i[i][1]) {
16149                return false;
16150            }
16151        }
16152        return true;
16153    }
16154
16155    function setVValue(newPath) {
16156        if(!shapesEqual(this.v, newPath)) {
16157            this.v = shape_pool.clone(newPath);
16158            this.localShapeCollection.releaseShapes();
16159            this.localShapeCollection.addShape(this.v);
16160            this._mdf = true;
16161            this.paths = this.localShapeCollection;
16162        }
16163    }
16164
16165    function processEffectsSequence() {
16166        if (this.elem.globalData.frameId === this.frameId) {
16167            return;
16168        } else if (!this.effectsSequence.length) {
16169            this._mdf = false;
16170            return;
16171        }
16172        if (this.lock) {
16173            this.setVValue(this.pv);
16174            return;
16175        }
16176        this.lock = true;
16177        this._mdf = false;
16178        var finalValue = this.kf ? this.pv : this.data.ks ? this.data.ks.k : this.data.pt.k;
16179        var i, len = this.effectsSequence.length;
16180        for(i = 0; i < len; i += 1) {
16181            finalValue = this.effectsSequence[i](finalValue);
16182        }
16183        this.setVValue(finalValue);
16184        this.lock = false;
16185        this.frameId = this.elem.globalData.frameId;
16186    };
16187
16188    function ShapeProperty(elem, data, type){
16189        this.propType = 'shape';
16190        this.comp = elem.comp;
16191        this.container = elem;
16192        this.elem = elem;
16193        this.data = data;
16194        this.k = false;
16195        this.kf = false;
16196        this._mdf = false;
16197        var pathData = type === 3 ? data.pt.k : data.ks.k;
16198        this.v = shape_pool.clone(pathData);
16199        this.pv = shape_pool.clone(this.v);
16200        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
16201        this.paths = this.localShapeCollection;
16202        this.paths.addShape(this.v);
16203        this.reset = resetShape;
16204        this.effectsSequence = [];
16205    }
16206
16207    function addEffect(effectFunction) {
16208        this.effectsSequence.push(effectFunction);
16209        this.container.addDynamicProperty(this);
16210    }
16211
16212    ShapeProperty.prototype.interpolateShape = interpolateShape;
16213    ShapeProperty.prototype.getValue = processEffectsSequence;
16214    ShapeProperty.prototype.setVValue = setVValue;
16215    ShapeProperty.prototype.addEffect = addEffect;
16216
16217    function KeyframedShapeProperty(elem,data,type){
16218        this.propType = 'shape';
16219        this.comp = elem.comp;
16220        this.elem = elem;
16221        this.container = elem;
16222        this.offsetTime = elem.data.st;
16223        this.keyframes = type === 3 ? data.pt.k : data.ks.k;
16224        this.k = true;
16225        this.kf = true;
16226        var i, len = this.keyframes[0].s[0].i.length;
16227        var jLen = this.keyframes[0].s[0].i[0].length;
16228        this.v = shape_pool.newElement();
16229        this.v.setPathData(this.keyframes[0].s[0].c, len);
16230        this.pv = shape_pool.clone(this.v);
16231        this.localShapeCollection = shapeCollection_pool.newShapeCollection();
16232        this.paths = this.localShapeCollection;
16233        this.paths.addShape(this.v);
16234        this.lastFrame = initFrame;
16235        this.reset = resetShape;
16236        this._caching = {lastFrame: initFrame, lastIndex: 0};
16237        this.effectsSequence = [interpolateShapeCurrentTime.bind(this)];
16238    }
16239    KeyframedShapeProperty.prototype.getValue = processEffectsSequence;
16240    KeyframedShapeProperty.prototype.interpolateShape = interpolateShape;
16241    KeyframedShapeProperty.prototype.setVValue = setVValue;
16242    KeyframedShapeProperty.prototype.addEffect = addEffect;
16243
16244    var EllShapeProperty = (function(){
16245
16246        var cPoint = roundCorner;
16247
16248        function EllShapeProperty(elem,data) {
16249            /*this.v = {
16250                v: createSizedArray(4),
16251                i: createSizedArray(4),
16252                o: createSizedArray(4),
16253                c: true
16254            };*/
16255            this.v = shape_pool.newElement();
16256            this.v.setPathData(true, 4);
16257            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
16258            this.paths = this.localShapeCollection;
16259            this.localShapeCollection.addShape(this.v);
16260            this.d = data.d;
16261            this.elem = elem;
16262            this.comp = elem.comp;
16263            this.frameId = -1;
16264            this.initDynamicPropertyContainer(elem);
16265            this.p = PropertyFactory.getProp(elem,data.p,1,0,this);
16266            this.s = PropertyFactory.getProp(elem,data.s,1,0,this);
16267            if(this.dynamicProperties.length){
16268                this.k = true;
16269            }else{
16270                this.k = false;
16271                this.convertEllToPath();
16272            }
16273        };
16274
16275        EllShapeProperty.prototype = {
16276            reset: resetShape,
16277            getValue: function (){
16278                if(this.elem.globalData.frameId === this.frameId){
16279                    return;
16280                }
16281                this.frameId = this.elem.globalData.frameId;
16282                this.iterateDynamicProperties();
16283
16284                if(this._mdf){
16285                    this.convertEllToPath();
16286                }
16287            },
16288            convertEllToPath: function() {
16289                var p0 = this.p.v[0], p1 = this.p.v[1], s0 = this.s.v[0]/2, s1 = this.s.v[1]/2;
16290                var _cw = this.d !== 3;
16291                var _v = this.v;
16292                _v.v[0][0] = p0;
16293                _v.v[0][1] = p1 - s1;
16294                _v.v[1][0] = _cw ? p0 + s0 : p0 - s0;
16295                _v.v[1][1] = p1;
16296                _v.v[2][0] = p0;
16297                _v.v[2][1] = p1 + s1;
16298                _v.v[3][0] = _cw ? p0 - s0 : p0 + s0;
16299                _v.v[3][1] = p1;
16300                _v.i[0][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
16301                _v.i[0][1] = p1 - s1;
16302                _v.i[1][0] = _cw ? p0 + s0 : p0 - s0;
16303                _v.i[1][1] = p1 - s1 * cPoint;
16304                _v.i[2][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
16305                _v.i[2][1] = p1 + s1;
16306                _v.i[3][0] = _cw ? p0 - s0 : p0 + s0;
16307                _v.i[3][1] = p1 + s1 * cPoint;
16308                _v.o[0][0] = _cw ? p0 + s0 * cPoint : p0 - s0 * cPoint;
16309                _v.o[0][1] = p1 - s1;
16310                _v.o[1][0] = _cw ? p0 + s0 : p0 - s0;
16311                _v.o[1][1] = p1 + s1 * cPoint;
16312                _v.o[2][0] = _cw ? p0 - s0 * cPoint : p0 + s0 * cPoint;
16313                _v.o[2][1] = p1 + s1;
16314                _v.o[3][0] = _cw ? p0 - s0 : p0 + s0;
16315                _v.o[3][1] = p1 - s1 * cPoint;
16316            }
16317        }
16318
16319        extendPrototype([DynamicPropertyContainer], EllShapeProperty);
16320
16321        return EllShapeProperty;
16322    }());
16323
16324    var StarShapeProperty = (function() {
16325
16326        function StarShapeProperty(elem,data) {
16327            this.v = shape_pool.newElement();
16328            this.v.setPathData(true, 0);
16329            this.elem = elem;
16330            this.comp = elem.comp;
16331            this.data = data;
16332            this.frameId = -1;
16333            this.d = data.d;
16334            this.initDynamicPropertyContainer(elem);
16335            if(data.sy === 1){
16336                this.ir = PropertyFactory.getProp(elem,data.ir,0,0,this);
16337                this.is = PropertyFactory.getProp(elem,data.is,0,0.01,this);
16338                this.convertToPath = this.convertStarToPath;
16339            } else {
16340                this.convertToPath = this.convertPolygonToPath;
16341            }
16342            this.pt = PropertyFactory.getProp(elem,data.pt,0,0,this);
16343            this.p = PropertyFactory.getProp(elem,data.p,1,0,this);
16344            this.r = PropertyFactory.getProp(elem,data.r,0,degToRads,this);
16345            this.or = PropertyFactory.getProp(elem,data.or,0,0,this);
16346            this.os = PropertyFactory.getProp(elem,data.os,0,0.01,this);
16347            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
16348            this.localShapeCollection.addShape(this.v);
16349            this.paths = this.localShapeCollection;
16350            if(this.dynamicProperties.length){
16351                this.k = true;
16352            }else{
16353                this.k = false;
16354                this.convertToPath();
16355            }
16356        };
16357
16358        StarShapeProperty.prototype = {
16359            reset: resetShape,
16360            getValue: function() {
16361                if(this.elem.globalData.frameId === this.frameId){
16362                    return;
16363                }
16364                this.frameId = this.elem.globalData.frameId;
16365                this.iterateDynamicProperties();
16366                if(this._mdf){
16367                    this.convertToPath();
16368                }
16369            },
16370            convertStarToPath: function() {
16371                var numPts = Math.floor(this.pt.v)*2;
16372                var angle = Math.PI*2/numPts;
16373                /*this.v.v.length = numPts;
16374                this.v.i.length = numPts;
16375                this.v.o.length = numPts;*/
16376                var longFlag = true;
16377                var longRad = this.or.v;
16378                var shortRad = this.ir.v;
16379                var longRound = this.os.v;
16380                var shortRound = this.is.v;
16381                var longPerimSegment = 2*Math.PI*longRad/(numPts*2);
16382                var shortPerimSegment = 2*Math.PI*shortRad/(numPts*2);
16383                var i, rad,roundness,perimSegment, currentAng = -Math.PI/ 2;
16384                currentAng += this.r.v;
16385                var dir = this.data.d === 3 ? -1 : 1;
16386                this.v._length = 0;
16387                for(i=0;i<numPts;i+=1){
16388                    rad = longFlag ? longRad : shortRad;
16389                    roundness = longFlag ? longRound : shortRound;
16390                    perimSegment = longFlag ? longPerimSegment : shortPerimSegment;
16391                    var x = rad * Math.cos(currentAng);
16392                    var y = rad * Math.sin(currentAng);
16393                    var ox = x === 0 && y === 0 ? 0 : y/Math.sqrt(x*x + y*y);
16394                    var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
16395                    x +=  + this.p.v[0];
16396                    y +=  + this.p.v[1];
16397                    this.v.setTripleAt(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
16398
16399                    /*this.v.v[i] = [x,y];
16400                    this.v.i[i] = [x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir];
16401                    this.v.o[i] = [x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir];
16402                    this.v._length = numPts;*/
16403                    longFlag = !longFlag;
16404                    currentAng += angle*dir;
16405                }
16406            },
16407            convertPolygonToPath: function() {
16408                var numPts = Math.floor(this.pt.v);
16409                var angle = Math.PI*2/numPts;
16410                var rad = this.or.v;
16411                var roundness = this.os.v;
16412                var perimSegment = 2*Math.PI*rad/(numPts*4);
16413                var i, currentAng = -Math.PI/ 2;
16414                var dir = this.data.d === 3 ? -1 : 1;
16415                currentAng += this.r.v;
16416                this.v._length = 0;
16417                for(i=0;i<numPts;i+=1){
16418                    var x = rad * Math.cos(currentAng);
16419                    var y = rad * Math.sin(currentAng);
16420                    var ox = x === 0 && y === 0 ? 0 : y/Math.sqrt(x*x + y*y);
16421                    var oy = x === 0 && y === 0 ? 0 : -x/Math.sqrt(x*x + y*y);
16422                    x +=  + this.p.v[0];
16423                    y +=  + this.p.v[1];
16424                    this.v.setTripleAt(x,y,x-ox*perimSegment*roundness*dir,y-oy*perimSegment*roundness*dir,x+ox*perimSegment*roundness*dir,y+oy*perimSegment*roundness*dir, i, true);
16425                    currentAng += angle*dir;
16426                }
16427                this.paths.length = 0;
16428                this.paths[0] = this.v;
16429            }
16430
16431        }
16432        extendPrototype([DynamicPropertyContainer], StarShapeProperty);
16433
16434        return StarShapeProperty;
16435    }());
16436
16437    var RectShapeProperty = (function() {
16438
16439         function RectShapeProperty(elem,data) {
16440            this.v = shape_pool.newElement();
16441            this.v.c = true;
16442            this.localShapeCollection = shapeCollection_pool.newShapeCollection();
16443            this.localShapeCollection.addShape(this.v);
16444            this.paths = this.localShapeCollection;
16445            this.elem = elem;
16446            this.comp = elem.comp;
16447            this.frameId = -1;
16448            this.d = data.d;
16449            this.initDynamicPropertyContainer(elem);
16450            this.p = PropertyFactory.getProp(elem,data.p,1,0,this);
16451            this.s = PropertyFactory.getProp(elem,data.s,1,0,this);
16452            this.r = PropertyFactory.getProp(elem,data.r,0,0,this);
16453            if(this.dynamicProperties.length){
16454                this.k = true;
16455            }else{
16456                this.k = false;
16457                this.convertRectToPath();
16458            }
16459        };
16460
16461        RectShapeProperty.prototype = {
16462            convertRectToPath: function (){
16463                var p0 = this.p.v[0], p1 = this.p.v[1], v0 = this.s.v[0]/2, v1 = this.s.v[1]/2;
16464                var round = bm_min(v0,v1,this.r.v);
16465                var cPoint = round*(1-roundCorner);
16466                this.v._length = 0;
16467
16468                if(this.d === 2 || this.d === 1) {
16469                    this.v.setTripleAt(p0+v0, p1-v1+round,p0+v0, p1-v1+round,p0+v0,p1-v1+cPoint,0, true);
16470                    this.v.setTripleAt(p0+v0, p1+v1-round,p0+v0, p1+v1-cPoint,p0+v0, p1+v1-round,1, true);
16471                    if(round!== 0){
16472                        this.v.setTripleAt(p0+v0-round, p1+v1,p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,2, true);
16473                        this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,p0-v0+round,p1+v1,3, true);
16474                        this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,4, true);
16475                        this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,p0-v0,p1-v1+round,5, true);
16476                        this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,6, true);
16477                        this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,p0+v0-round,p1-v1,7, true);
16478                    } else {
16479                        this.v.setTripleAt(p0-v0,p1+v1,p0-v0+cPoint,p1+v1,p0-v0,p1+v1,2);
16480                        this.v.setTripleAt(p0-v0,p1-v1,p0-v0,p1-v1+cPoint,p0-v0,p1-v1,3);
16481                    }
16482                }else{
16483                    this.v.setTripleAt(p0+v0,p1-v1+round,p0+v0,p1-v1+cPoint,p0+v0,p1-v1+round,0, true);
16484                    if(round!== 0){
16485                        this.v.setTripleAt(p0+v0-round,p1-v1,p0+v0-round,p1-v1,p0+v0-cPoint,p1-v1,1, true);
16486                        this.v.setTripleAt(p0-v0+round,p1-v1,p0-v0+cPoint,p1-v1,p0-v0+round,p1-v1,2, true);
16487                        this.v.setTripleAt(p0-v0,p1-v1+round,p0-v0,p1-v1+round,p0-v0,p1-v1+cPoint,3, true);
16488                        this.v.setTripleAt(p0-v0,p1+v1-round,p0-v0,p1+v1-cPoint,p0-v0,p1+v1-round,4, true);
16489                        this.v.setTripleAt(p0-v0+round,p1+v1,p0-v0+round,p1+v1,p0-v0+cPoint,p1+v1,5, true);
16490                        this.v.setTripleAt(p0+v0-round,p1+v1,p0+v0-cPoint,p1+v1,p0+v0-round,p1+v1,6, true);
16491                        this.v.setTripleAt(p0+v0,p1+v1-round,p0+v0,p1+v1-round,p0+v0,p1+v1-cPoint,7, true);
16492                    } else {
16493                        this.v.setTripleAt(p0-v0,p1-v1,p0-v0+cPoint,p1-v1,p0-v0,p1-v1,1, true);
16494                        this.v.setTripleAt(p0-v0,p1+v1,p0-v0,p1+v1-cPoint,p0-v0,p1+v1,2, true);
16495                        this.v.setTripleAt(p0+v0,p1+v1,p0+v0-cPoint,p1+v1,p0+v0,p1+v1,3, true);
16496
16497                    }
16498                }
16499            },
16500            getValue: function(frameNum){
16501                if(this.elem.globalData.frameId === this.frameId){
16502                    return;
16503                }
16504                this.frameId = this.elem.globalData.frameId;
16505                this.iterateDynamicProperties();
16506                if(this._mdf){
16507                    this.convertRectToPath();
16508                }
16509
16510            },
16511            reset: resetShape
16512        }
16513        extendPrototype([DynamicPropertyContainer], RectShapeProperty);
16514
16515        return RectShapeProperty;
16516    }());
16517
16518    function getShapeProp(elem,data,type){
16519        var prop;
16520        if(type === 3 || type === 4){
16521            var dataProp = type === 3 ? data.pt : data.ks;
16522            var keys = dataProp.k;
16523            if(keys.length){
16524                prop = new KeyframedShapeProperty(elem, data, type);
16525            }else{
16526                prop = new ShapeProperty(elem, data, type);
16527            }
16528        }else if(type === 5){
16529            prop = new RectShapeProperty(elem, data);
16530        }else if(type === 6){
16531            prop = new EllShapeProperty(elem, data);
16532        }else if(type === 7){
16533            prop = new StarShapeProperty(elem, data);
16534        }
16535        if(prop.k){
16536            elem.addDynamicProperty(prop);
16537        }
16538        return prop;
16539    }
16540
16541    function getConstructorFunction() {
16542        return ShapeProperty;
16543    }
16544
16545    function getKeyframedConstructorFunction() {
16546        return KeyframedShapeProperty;
16547    }
16548
16549    var ob = {};
16550    ob.getShapeProp = getShapeProp;
16551    ob.getConstructorFunction = getConstructorFunction;
16552    ob.getKeyframedConstructorFunction = getKeyframedConstructorFunction;
16553    return ob;
16554}());
16555var ShapeModifiers = (function(){
16556    var ob = {};
16557    var modifiers = {};
16558    ob.registerModifier = registerModifier;
16559    ob.getModifier = getModifier;
16560
16561    function registerModifier(nm,factory){
16562        if(!modifiers[nm]){
16563            modifiers[nm] = factory;
16564        }
16565    }
16566
16567    function getModifier(nm,elem, data){
16568        return new modifiers[nm](elem, data);
16569    }
16570
16571    return ob;
16572}());
16573
16574function ShapeModifier(){}
16575ShapeModifier.prototype.initModifierProperties = function(){};
16576ShapeModifier.prototype.addShapeToModifier = function(){};
16577ShapeModifier.prototype.addShape = function(data){
16578    if (!this.closed) {
16579        // Adding shape to dynamic properties. It covers the case where a shape has no effects applied, to reset it's _mdf state on every tick.
16580        data.sh.container.addDynamicProperty(data.sh);
16581        var shapeData = {shape:data.sh, data: data, localShapeCollection:shapeCollection_pool.newShapeCollection()};
16582        this.shapes.push(shapeData);
16583        this.addShapeToModifier(shapeData);
16584        if (this._isAnimated) {
16585            data.setAsAnimated();
16586        }
16587    }
16588};
16589ShapeModifier.prototype.init = function(elem,data){
16590    this.shapes = [];
16591    this.elem = elem;
16592    this.initDynamicPropertyContainer(elem);
16593    this.initModifierProperties(elem,data);
16594    this.frameId = initialDefaultFrame;
16595    this.closed = false;
16596    this.k = false;
16597    if(this.dynamicProperties.length){
16598        this.k = true;
16599    }else{
16600        this.getValue(true);
16601    }
16602};
16603ShapeModifier.prototype.processKeys = function(){
16604    if(this.elem.globalData.frameId === this.frameId){
16605        return;
16606    }
16607    this.frameId = this.elem.globalData.frameId;
16608    this.iterateDynamicProperties();
16609};
16610
16611extendPrototype([DynamicPropertyContainer], ShapeModifier);
16612function TrimModifier(){
16613}
16614extendPrototype([ShapeModifier], TrimModifier);
16615TrimModifier.prototype.initModifierProperties = function(elem, data) {
16616    this.s = PropertyFactory.getProp(elem, data.s, 0, 0.01, this);
16617    this.e = PropertyFactory.getProp(elem, data.e, 0, 0.01, this);
16618    this.o = PropertyFactory.getProp(elem, data.o, 0, 0, this);
16619    this.sValue = 0;
16620    this.eValue = 0;
16621    this.getValue = this.processKeys;
16622    this.m = data.m;
16623    this._isAnimated = !!this.s.effectsSequence.length || !!this.e.effectsSequence.length || !!this.o.effectsSequence.length;
16624};
16625
16626TrimModifier.prototype.addShapeToModifier = function(shapeData){
16627    shapeData.pathsData = [];
16628};
16629
16630TrimModifier.prototype.calculateShapeEdges = function(s, e, shapeLength, addedLength, totalModifierLength) {
16631    var segments = [];
16632    if (e <= 1) {
16633        segments.push({
16634            s: s,
16635            e: e
16636        });
16637    } else if (s >= 1) {
16638        segments.push({
16639            s: s - 1,
16640            e: e - 1
16641        });
16642    } else {
16643        segments.push({
16644            s: s,
16645            e: 1
16646        });
16647        segments.push({
16648            s: 0,
16649            e: e - 1
16650        });
16651    }
16652    var shapeSegments = [];
16653    var i, len = segments.length, segmentOb;
16654    for (i = 0; i < len; i += 1) {
16655        segmentOb = segments[i];
16656        if (segmentOb.e * totalModifierLength < addedLength || segmentOb.s * totalModifierLength > addedLength + shapeLength) {
16657            
16658        } else {
16659            var shapeS, shapeE;
16660            if (segmentOb.s * totalModifierLength <= addedLength) {
16661                shapeS = 0;
16662            } else {
16663                shapeS = (segmentOb.s * totalModifierLength - addedLength) / shapeLength;
16664            }
16665            if(segmentOb.e * totalModifierLength >= addedLength + shapeLength) {
16666                shapeE = 1;
16667            } else {
16668                shapeE = ((segmentOb.e * totalModifierLength - addedLength) / shapeLength);
16669            }
16670            shapeSegments.push([shapeS, shapeE]);
16671        }
16672    }
16673    if (!shapeSegments.length) {
16674        shapeSegments.push([0, 0]);
16675    }
16676    return shapeSegments;
16677};
16678
16679TrimModifier.prototype.releasePathsData = function(pathsData) {
16680    var i, len = pathsData.length;
16681    for (i = 0; i < len; i += 1) {
16682        segments_length_pool.release(pathsData[i]);
16683    }
16684    pathsData.length = 0;
16685    return pathsData;
16686};
16687
16688TrimModifier.prototype.processShapes = function(_isFirstFrame) {
16689    var s, e;
16690    if (this._mdf || _isFirstFrame) {
16691        var o = (this.o.v % 360) / 360;
16692        if (o < 0) {
16693            o += 1;
vendor: 7,175 bytes, lines 16694-16857
16694        }
16695        s = (this.s.v > 1 ? 1 : this.s.v < 0 ? 0 : this.s.v) + o;
16696        e = (this.e.v > 1 ? 1 : this.e.v < 0 ? 0 : this.e.v) + o;
16697        if (s === e) {
16698
16699        }
16700        if (s > e) {
16701            var _s = s;
16702            s = e;
16703            e = _s;
16704        }
16705        s = Math.round(s * 10000) * 0.0001;
16706        e = Math.round(e * 10000) * 0.0001;
16707        this.sValue = s;
16708        this.eValue = e;
16709    } else {
16710        s = this.sValue;
16711        e = this.eValue;
16712    }
16713    var shapePaths;
16714    var i, len = this.shapes.length, j, jLen;
16715    var pathsData, pathData, totalShapeLength, totalModifierLength = 0;
16716
16717    if (e === s) {
16718        for (i = 0; i < len; i += 1) {
16719            this.shapes[i].localShapeCollection.releaseShapes();
16720            this.shapes[i].shape._mdf = true;
16721            this.shapes[i].shape.paths = this.shapes[i].localShapeCollection;
16722        }
16723    } else if (!((e === 1 && s === 0) || (e===0 && s === 1))){
16724        var segments = [], shapeData, localShapeCollection;
16725        for (i = 0; i < len; i += 1) {
16726            shapeData = this.shapes[i];
16727            // if shape hasn't changed and trim properties haven't changed, cached previous path can be used
16728            if (!shapeData.shape._mdf && !this._mdf && !_isFirstFrame && this.m !== 2) {
16729                shapeData.shape.paths = shapeData.localShapeCollection;
16730            } else {
16731                shapePaths = shapeData.shape.paths;
16732                jLen = shapePaths._length;
16733                totalShapeLength = 0;
16734                if (!shapeData.shape._mdf && shapeData.pathsData.length) {
16735                    totalShapeLength = shapeData.totalShapeLength;
16736                } else {
16737                    pathsData = this.releasePathsData(shapeData.pathsData);
16738                    for (j = 0; j < jLen; j += 1) {
16739                        pathData = bez.getSegmentsLength(shapePaths.shapes[j]);
16740                        pathsData.push(pathData);
16741                        totalShapeLength += pathData.totalLength;
16742                    }
16743                    shapeData.totalShapeLength = totalShapeLength;
16744                    shapeData.pathsData = pathsData;
16745                }
16746
16747                totalModifierLength += totalShapeLength;
16748                shapeData.shape._mdf = true;
16749            }
16750        }
16751        var shapeS = s, shapeE = e, addedLength = 0, edges;
16752        for (i = len - 1; i >= 0; i -= 1) {
16753            shapeData = this.shapes[i];
16754            if (shapeData.shape._mdf) {
16755                localShapeCollection = shapeData.localShapeCollection;
16756                localShapeCollection.releaseShapes();
16757                //if m === 2 means paths are trimmed individually so edges need to be found for this specific shape relative to whoel group
16758                if (this.m === 2 && len > 1) {
16759                    edges = this.calculateShapeEdges(s, e, shapeData.totalShapeLength, addedLength, totalModifierLength);
16760                    addedLength += shapeData.totalShapeLength;
16761                } else {
16762                    edges = [[shapeS, shapeE]];
16763                }
16764                jLen = edges.length;
16765                for (j = 0; j < jLen; j += 1) {
16766                    shapeS = edges[j][0];
16767                    shapeE = edges[j][1];
16768                    segments.length = 0;
16769                    if (shapeE <= 1) {
16770                        segments.push({
16771                            s:shapeData.totalShapeLength * shapeS,
16772                            e:shapeData.totalShapeLength * shapeE
16773                        });
16774                    } else if (shapeS >= 1) {
16775                        segments.push({
16776                            s:shapeData.totalShapeLength * (shapeS - 1),
16777                            e:shapeData.totalShapeLength * (shapeE - 1)
16778                        });
16779                    } else {
16780                        segments.push({
16781                            s:shapeData.totalShapeLength * shapeS,
16782                            e:shapeData.totalShapeLength
16783                        });
16784                        segments.push({
16785                            s:0,
16786                            e:shapeData.totalShapeLength * (shapeE - 1)
16787                        });
16788                    }
16789                    var newShapesData = this.addShapes(shapeData,segments[0]);
16790                    if (segments[0].s !== segments[0].e) {
16791                        if (segments.length > 1) {
16792                            var lastShapeInCollection = shapeData.shape.paths.shapes[shapeData.shape.paths._length - 1];
16793                            if (lastShapeInCollection.c) {
16794                                var lastShape = newShapesData.pop();
16795                                this.addPaths(newShapesData, localShapeCollection);
16796                                newShapesData = this.addShapes(shapeData, segments[1], lastShape);
16797                            } else {
16798                                this.addPaths(newShapesData, localShapeCollection);
16799                                newShapesData = this.addShapes(shapeData, segments[1]);
16800                            }
16801                        } 
16802                        this.addPaths(newShapesData, localShapeCollection);
16803                    }
16804                    
16805                }
16806                shapeData.shape.paths = localShapeCollection;
16807            }
16808        }
16809    } else if (this._mdf) {
16810        for (i = 0; i < len; i += 1) {
16811            //Releasign Trim Cached paths data when no trim applied in case shapes are modified inbetween.
16812            //Don't remove this even if it's losing cached info.
16813            this.shapes[i].pathsData.length = 0;
16814            this.shapes[i].shape._mdf = true;
16815        }
16816    }
16817};
16818
16819TrimModifier.prototype.addPaths = function(newPaths, localShapeCollection) {
16820    var i, len = newPaths.length;
16821    for (i = 0; i < len; i += 1) {
16822        localShapeCollection.addShape(newPaths[i]);
16823    }
16824};
16825
16826TrimModifier.prototype.addSegment = function(pt1, pt2, pt3, pt4, shapePath, pos, newShape) {
16827    shapePath.setXYAt(pt2[0], pt2[1], 'o', pos);
16828    shapePath.setXYAt(pt3[0], pt3[1], 'i', pos + 1);
16829    if(newShape){
16830        shapePath.setXYAt(pt1[0], pt1[1], 'v', pos);
16831    }
16832    shapePath.setXYAt(pt4[0], pt4[1], 'v', pos + 1);
16833};
16834
16835TrimModifier.prototype.addSegmentFromArray = function(points, shapePath, pos, newShape) {
16836    shapePath.setXYAt(points[1], points[5], 'o', pos);
16837    shapePath.setXYAt(points[2], points[6], 'i', pos + 1);
16838    if(newShape){
16839        shapePath.setXYAt(points[0], points[4], 'v', pos);
16840    }
16841    shapePath.setXYAt(points[3], points[7], 'v', pos + 1);
16842};
16843
16844TrimModifier.prototype.addShapes = function(shapeData, shapeSegment, shapePath) {
16845    var pathsData = shapeData.pathsData;
16846    var shapePaths = shapeData.shape.paths.shapes;
16847    var i, len = shapeData.shape.paths._length, j, jLen;
16848    var addedLength = 0;
16849    var currentLengthData,segmentCount;
16850    var lengths;
16851    var segment;
16852    var shapes = [];
16853    var initPos;
16854    var newShape = true;
16855    if (!shapePath) {
16856        shapePath = shape_pool.newElement();
16857        segmentCount = 0;
vendor: 8,723 bytes, lines 16858-17045
16858        initPos = 0;
16859    } else {
16860        segmentCount = shapePath._length;
16861        initPos = shapePath._length;
16862    }
16863    shapes.push(shapePath);
16864    for (i = 0; i < len; i += 1) {
16865        lengths = pathsData[i].lengths;
16866        shapePath.c = shapePaths[i].c;
16867        jLen = shapePaths[i].c ? lengths.length : lengths.length + 1;
16868        for (j = 1; j < jLen; j +=1) {
16869            currentLengthData = lengths[j-1];
16870            if (addedLength + currentLengthData.addedLength < shapeSegment.s) {
16871                addedLength += currentLengthData.addedLength;
16872                shapePath.c = false;
16873            } else if(addedLength > shapeSegment.e) {
16874                shapePath.c = false;
16875                break;
16876            } else {
16877                if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + currentLengthData.addedLength) {
16878                    this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[j], shapePaths[i].v[j], shapePath, segmentCount, newShape);
16879                    newShape = false;
16880                } else {
16881                    segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[j], shapePaths[i].o[j - 1], shapePaths[i].i[j], (shapeSegment.s - addedLength)/currentLengthData.addedLength,(shapeSegment.e - addedLength)/currentLengthData.addedLength, lengths[j-1]);
16882                    this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
16883                    // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
16884                    newShape = false;
16885                    shapePath.c = false;
16886                }
16887                addedLength += currentLengthData.addedLength;
16888                segmentCount += 1;
16889            }
16890        }
16891        if (shapePaths[i].c && lengths.length) {
16892            currentLengthData = lengths[j - 1];
16893            if (addedLength <= shapeSegment.e) {
16894                var segmentLength = lengths[j - 1].addedLength;
16895                if (shapeSegment.s <= addedLength && shapeSegment.e >= addedLength + segmentLength) {
16896                    this.addSegment(shapePaths[i].v[j - 1], shapePaths[i].o[j - 1], shapePaths[i].i[0], shapePaths[i].v[0], shapePath, segmentCount, newShape);
16897                    newShape = false;
16898                } else {
16899                    segment = bez.getNewSegment(shapePaths[i].v[j - 1], shapePaths[i].v[0], shapePaths[i].o[j - 1], shapePaths[i].i[0], (shapeSegment.s - addedLength) / segmentLength, (shapeSegment.e - addedLength) / segmentLength, lengths[j - 1]);
16900                    this.addSegmentFromArray(segment, shapePath, segmentCount, newShape);
16901                    // this.addSegment(segment.pt1, segment.pt3, segment.pt4, segment.pt2, shapePath, segmentCount, newShape);
16902                    newShape = false;
16903                    shapePath.c = false;
16904                }
16905            } else {
16906                shapePath.c = false;
16907            }
16908            addedLength += currentLengthData.addedLength;
16909            segmentCount += 1;
16910        }
16911        if (shapePath._length) {
16912            shapePath.setXYAt(shapePath.v[initPos][0], shapePath.v[initPos][1], 'i', initPos);
16913            shapePath.setXYAt(shapePath.v[shapePath._length - 1][0], shapePath.v[shapePath._length - 1][1],'o', shapePath._length - 1);
16914        }
16915        if (addedLength > shapeSegment.e) {
16916            break;
16917        }
16918        if (i < len - 1) {
16919            shapePath = shape_pool.newElement();
16920            newShape = true;
16921            shapes.push(shapePath);
16922            segmentCount = 0;
16923        }
16924    }
16925    return shapes;
16926};
16927
16928
16929ShapeModifiers.registerModifier('tm', TrimModifier);
16930function RoundCornersModifier(){}
16931extendPrototype([ShapeModifier],RoundCornersModifier);
16932RoundCornersModifier.prototype.initModifierProperties = function(elem,data){
16933    this.getValue = this.processKeys;
16934    this.rd = PropertyFactory.getProp(elem,data.r,0,null,this);
16935    this._isAnimated = !!this.rd.effectsSequence.length;
16936};
16937
16938RoundCornersModifier.prototype.processPath = function(path, round){
16939    var cloned_path = shape_pool.newElement();
16940    cloned_path.c = path.c;
16941    var i, len = path._length;
16942    var currentV,currentI,currentO,closerV, newV,newO,newI,distance,newPosPerc,index = 0;
16943    var vX,vY,oX,oY,iX,iY;
16944    for(i=0;i<len;i+=1){
16945        currentV = path.v[i];
16946        currentO = path.o[i];
16947        currentI = path.i[i];
16948        if(currentV[0]===currentO[0] && currentV[1]===currentO[1] && currentV[0]===currentI[0] && currentV[1]===currentI[1]){
16949            if((i===0 || i === len - 1) && !path.c){
16950                cloned_path.setTripleAt(currentV[0],currentV[1],currentO[0],currentO[1],currentI[0],currentI[1],index);
16951                /*cloned_path.v[index] = currentV;
16952                cloned_path.o[index] = currentO;
16953                cloned_path.i[index] = currentI;*/
16954                index += 1;
16955            } else {
16956                if(i===0){
16957                    closerV = path.v[len-1];
16958                } else {
16959                    closerV = path.v[i-1];
16960                }
16961                distance = Math.sqrt(Math.pow(currentV[0]-closerV[0],2)+Math.pow(currentV[1]-closerV[1],2));
16962                newPosPerc = distance ? Math.min(distance/2,round)/distance : 0;
16963                vX = iX = currentV[0]+(closerV[0]-currentV[0])*newPosPerc;
16964                vY = iY = currentV[1]-(currentV[1]-closerV[1])*newPosPerc;
16965                oX = vX-(vX-currentV[0])*roundCorner;
16966                oY = vY-(vY-currentV[1])*roundCorner;
16967                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
16968                index += 1;
16969
16970                if(i === len - 1){
16971                    closerV = path.v[0];
16972                } else {
16973                    closerV = path.v[i+1];
16974                }
16975                distance = Math.sqrt(Math.pow(currentV[0]-closerV[0],2)+Math.pow(currentV[1]-closerV[1],2));
16976                newPosPerc = distance ? Math.min(distance/2,round)/distance : 0;
16977                vX = oX = currentV[0]+(closerV[0]-currentV[0])*newPosPerc;
16978                vY = oY = currentV[1]+(closerV[1]-currentV[1])*newPosPerc;
16979                iX = vX-(vX-currentV[0])*roundCorner;
16980                iY = vY-(vY-currentV[1])*roundCorner;
16981                cloned_path.setTripleAt(vX,vY,oX,oY,iX,iY,index);
16982                index += 1;
16983            }
16984        } else {
16985            cloned_path.setTripleAt(path.v[i][0],path.v[i][1],path.o[i][0],path.o[i][1],path.i[i][0],path.i[i][1],index);
16986            index += 1;
16987        }
16988    }
16989    return cloned_path;
16990};
16991
16992RoundCornersModifier.prototype.processShapes = function(_isFirstFrame){
16993    var shapePaths;
16994    var i, len = this.shapes.length;
16995    var j, jLen;
16996    var rd = this.rd.v;
16997
16998    if(rd !== 0){
16999        var shapeData, newPaths, localShapeCollection;
17000        for(i=0;i<len;i+=1){
17001            shapeData = this.shapes[i];
17002            newPaths = shapeData.shape.paths;
17003            localShapeCollection = shapeData.localShapeCollection;
17004            if(!(!shapeData.shape._mdf && !this._mdf && !_isFirstFrame)){
17005                localShapeCollection.releaseShapes();
17006                shapeData.shape._mdf = true;
17007                shapePaths = shapeData.shape.paths.shapes;
17008                jLen = shapeData.shape.paths._length;
17009                for(j=0;j<jLen;j+=1){
17010                    localShapeCollection.addShape(this.processPath(shapePaths[j],rd));
17011                }
17012            }
17013            shapeData.shape.paths = shapeData.localShapeCollection;
17014        }
17015
17016    }
17017    if(!this.dynamicProperties.length){
17018        this._mdf = false;
17019    }
17020};
17021
17022ShapeModifiers.registerModifier('rd',RoundCornersModifier);
17023function RepeaterModifier(){}
17024extendPrototype([ShapeModifier], RepeaterModifier);
17025
17026RepeaterModifier.prototype.initModifierProperties = function(elem,data){
17027    this.getValue = this.processKeys;
17028    this.c = PropertyFactory.getProp(elem,data.c,0,null,this);
17029    this.o = PropertyFactory.getProp(elem,data.o,0,null,this);
17030    this.tr = TransformPropertyFactory.getTransformProperty(elem,data.tr,this);
17031    this.so = PropertyFactory.getProp(elem,data.tr.so,0,0.01,this);
17032    this.eo = PropertyFactory.getProp(elem,data.tr.eo,0,0.01,this);
17033    this.data = data;
17034    if(!this.dynamicProperties.length){
17035        this.getValue(true);
17036    }
17037    this._isAnimated = !!this.dynamicProperties.length;
17038    this.pMatrix = new Matrix();
17039    this.rMatrix = new Matrix();
17040    this.sMatrix = new Matrix();
17041    this.tMatrix = new Matrix();
17042    this.matrix = new Matrix();
17043};
17044
17045RepeaterModifier.prototype.applyTransforms = function(pMatrix, rMatr
17045ix, sMatrix, transform, perc, inv){
17046    var dir = inv ? -1 : 1;
17047    var scaleX = transform.s.v[0] + (1 - transform.s.v[0]) * (1 - perc);
17048    var scaleY = transform.s.v[1] + (1 - transform.s.v[1]) * (1 - perc);
17049    pMatrix.translate(transform.p.v[0] * dir * perc, transform.p.v[1] * dir * perc, transform.p.v[2]);
17050    rMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
17051    rMatrix.rotate(-transform.r.v * dir * perc);
17052    rMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
17053    sMatrix.translate(-transform.a.v[0], -transform.a.v[1], transform.a.v[2]);
17054    sMatrix.scale(inv ? 1/scaleX : scaleX, inv ? 1/scaleY : scaleY);
17055    sMatrix.translate(transform.a.v[0], transform.a.v[1], transform.a.v[2]);
17056};
17057
17058RepeaterModifier.prototype.init = function(elem, arr, pos, elemsData) {
17059    this.elem = elem;
17060    this.arr = arr;
17061    this.pos = pos;
17062    this.elemsData = elemsData;
17063    this._currentCopies = 0;
17064    this._elements = [];
17065    this._groups = [];
17066    this.frameId = -1;
17067    this.initDynamicPropertyContainer(elem);
17068    this.initModifierProperties(elem,arr[pos]);
17069    var cont = 0;
17070    while(pos>0){
17071        pos -= 1;
17072        //this._elements.unshift(arr.splice(pos,1)[0]);
17073        this._elements.unshift(arr[pos]);
17074        cont += 1;
17075    }
17076    if(this.dynamicProperties.length){
17077        this.k = true;
17078    }else{
17079        this.getValue(true);
17080    }
17081};
17082
17083RepeaterModifier.prototype.resetElements = function(elements){
17084    var i, len = elements.length;
17085    for(i = 0; i < len; i += 1) {
17086        elements[i]._processed = false;
17087        if(elements[i].ty === 'gr'){
17088            this.resetElements(elements[i].it);
17089        }
17090    }
17091};
17092
17093RepeaterModifier.prototype.cloneElements = function(elements){
17094    var i, len = elements.length;
17095    var newElements = JSON.parse(JSON.stringify(elements));
17096    this.resetElements(newElements);
17097    return newElements;
17098};
17099
17100RepeaterModifier.prototype.changeGroupRender = function(elements, renderFlag) {
17101    var i, len = elements.length;
17102    for(i = 0; i < len; i += 1) {
17103        elements[i]._render = renderFlag;
17104        if(elements[i].ty === 'gr') {
17105            this.changeGroupRender(elements[i].it, renderFlag);
17106        }
17107    }
17108};
17109
17110RepeaterModifier.prototype.processShapes = function(_isFirstFrame) {
17111    var items, itemsTransform, i, dir, cont;
17112    if(this._mdf || _isFirstFrame){
17113        var copies = Math.ceil(this.c.v);
17114        if(this._groups.length < copies){
17115            while(this._groups.length < copies){
17116                var group = {
17117                    it:this.cloneElements(this._elements),
17118                    ty:'gr'
17119                };
17120                group.it.push({"a":{"a":0,"ix":1,"k":[0,0]},"nm":"Transform","o":{"a":0,"ix":7,"k":100},"p":{"a":0,"ix":2,"k":[0,0]},"r":{"a":1,"ix":6,"k":[{s:0,e:0,t:0},{s:0,e:0,t:1}]},"s":{"a":0,"ix":3,"k":[100,100]},"sa":{"a":0,"ix":5,"k":0},"sk":{"a":0,"ix":4,"k":0},"ty":"tr"});
17121                
17122                this.arr.splice(0,0,group);
17123                this._groups.splice(0,0,group);
17124                this._currentCopies += 1;
17125            }
17126            this.elem.reloadShapes();
17127        }
17128        cont = 0;
17129        var renderFlag;
17130        for(i = 0; i  <= this._groups.length - 1; i += 1){
17131            renderFlag = cont < copies;
17132            this._groups[i]._render = renderFlag;
17133            this.changeGroupRender(this._groups[i].it, renderFlag);
17134            cont += 1;
17135        }
17136        
17137        this._currentCopies = copies;
17138        ////
17139
17140        var offset = this.o.v;
17141        var offsetModulo = offset%1;
17142        var roundOffset = offset > 0 ? Math.floor(offset) : Math.ceil(offset);
17143        var k;
17144        var tMat = this.tr.v.props;
17145        var pProps = this.pMatrix.props;
17146        var rProps = this.rMatrix.props;
17147        var sProps = this.sMatrix.props;
17148        this.pMatrix.reset();
17149        this.rMatrix.reset();
17150        this.sMatrix.reset();
17151        this.tMatrix.reset();
17152        this.matrix.reset();
17153        var iteration = 0;
17154
17155        if(offset > 0) {
17156            while(iteration<roundOffset){
17157                this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
17158                iteration += 1;
vendor: 7,215 bytes, lines 17159-17351
17159            }
17160            if(offsetModulo){
17161                this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, offsetModulo, false);
17162                iteration += offsetModulo;
17163            }
17164        } else if(offset < 0) {
17165            while(iteration>roundOffset){
17166                this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, true);
17167                iteration -= 1;
17168            }
17169            if(offsetModulo){
17170                this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, - offsetModulo, true);
17171                iteration -= offsetModulo;
17172            }
17173        }
17174        i = this.data.m === 1 ? 0 : this._currentCopies - 1;
17175        dir = this.data.m === 1 ? 1 : -1;
17176        cont = this._currentCopies;
17177        var j, jLen;
17178        while(cont){
17179            items = this.elemsData[i].it;
17180            itemsTransform = items[items.length - 1].transform.mProps.v.props;
17181            jLen = itemsTransform.length;
17182            items[items.length - 1].transform.mProps._mdf = true;
17183            items[items.length - 1].transform.op._mdf = true;
17184            items[items.length - 1].transform.op.v = this.so.v + (this.eo.v - this.so.v) * (i / (this._currentCopies - 1));
17185            if(iteration !== 0){
17186                if((i !== 0 && dir === 1) || (i !== this._currentCopies - 1 && dir === -1)){
17187                    this.applyTransforms(this.pMatrix, this.rMatrix, this.sMatrix, this.tr, 1, false);
17188                }
17189                this.matrix.transform(rProps[0],rProps[1],rProps[2],rProps[3],rProps[4],rProps[5],rProps[6],rProps[7],rProps[8],rProps[9],rProps[10],rProps[11],rProps[12],rProps[13],rProps[14],rProps[15]);
17190                this.matrix.transform(sProps[0],sProps[1],sProps[2],sProps[3],sProps[4],sProps[5],sProps[6],sProps[7],sProps[8],sProps[9],sProps[10],sProps[11],sProps[12],sProps[13],sProps[14],sProps[15]);
17191                this.matrix.transform(pProps[0],pProps[1],pProps[2],pProps[3],pProps[4],pProps[5],pProps[6],pProps[7],pProps[8],pProps[9],pProps[10],pProps[11],pProps[12],pProps[13],pProps[14],pProps[15]);
17192                
17193                for(j=0;j<jLen;j+=1) {
17194                    itemsTransform[j] = this.matrix.props[j];
17195                }
17196                this.matrix.reset();
17197            } else {
17198                this.matrix.reset();
17199                for(j=0;j<jLen;j+=1) {
17200                    itemsTransform[j] = this.matrix.props[j];
17201                }
17202            }
17203            iteration += 1;
17204            cont -= 1;
17205            i += dir;
17206        }
17207    } else {
17208        cont = this._currentCopies;
17209        i = 0;
17210        dir = 1;
17211        while(cont){
17212            items = this.elemsData[i].it;
17213            itemsTransform = items[items.length - 1].transform.mProps.v.props;
17214            items[items.length - 1].transform.mProps._mdf = false;
17215            items[items.length - 1].transform.op._mdf = false;
17216            cont -= 1;
17217            i += dir;
17218        }
17219    }
17220};
17221
17222RepeaterModifier.prototype.addShape = function(){};
17223
17224ShapeModifiers.registerModifier('rp',RepeaterModifier);
17225function ShapeCollection(){
17226	this._length = 0;
17227	this._maxLength = 4;
17228	this.shapes = createSizedArray(this._maxLength);
17229}
17230
17231ShapeCollection.prototype.addShape = function(shapeData){
17232	if(this._length === this._maxLength){
17233		this.shapes = this.shapes.concat(createSizedArray(this._maxLength));
17234		this._maxLength *= 2;
17235	}
17236	this.shapes[this._length] = shapeData;
17237	this._length += 1;
17238};
17239
17240ShapeCollection.prototype.releaseShapes = function(){
17241	var i;
17242	for(i = 0; i < this._length; i += 1) {
17243		shape_pool.release(this.shapes[i]);
17244	}
17245	this._length = 0;
17246};
17247function DashProperty(elem, data, renderer, container) {
17248    this.elem = elem;
17249    this.frameId = -1;
17250    this.dataProps = createSizedArray(data.length);
17251    this.renderer = renderer;
17252    this.k = false;
17253    this.dashStr = '';
17254    this.dashArray = createTypedArray('float32',  data.length ? data.length - 1 : 0);
17255    this.dashoffset = createTypedArray('float32',  1);
17256    this.initDynamicPropertyContainer(container);
17257    var i, len = data.length || 0, prop;
17258    for(i = 0; i < len; i += 1) {
17259        prop = PropertyFactory.getProp(elem,data[i].v,0, 0, this);
17260        this.k = prop.k || this.k;
17261        this.dataProps[i] = {n:data[i].n,p:prop};
17262    }
17263    if(!this.k){
17264        this.getValue(true);
17265    }
17266    this._isAnimated = this.k;
17267}
17268
17269DashProperty.prototype.getValue = function(forceRender) {
17270    if(this.elem.globalData.frameId === this.frameId && !forceRender){
17271        return;
17272    }
17273    this.frameId = this.elem.globalData.frameId;
17274    this.iterateDynamicProperties();
17275    this._mdf = this._mdf || forceRender;
17276    if (this._mdf) {
17277        var i = 0, len = this.dataProps.length;
17278        if(this.renderer === 'svg') {
17279            this.dashStr = '';
17280        }
17281        for(i=0;i<len;i+=1){
17282            if(this.dataProps[i].n != 'o'){
17283                if(this.renderer === 'svg') {
17284                    this.dashStr += ' ' + this.dataProps[i].p.v;
17285                }else{
17286                    this.dashArray[i] = this.dataProps[i].p.v;
17287                }
17288            }else{
17289                this.dashoffset[0] = this.dataProps[i].p.v;
17290            }
17291        }
17292    }
17293};
17294extendPrototype([DynamicPropertyContainer], DashProperty);
17295function GradientProperty(elem,data,container){
17296    this.data = data;
17297    this.c = createTypedArray('uint8c', data.p*4);
17298    var cLength = data.k.k[0].s ? (data.k.k[0].s.length - data.p*4) : data.k.k.length - data.p*4;
17299    this.o = createTypedArray('float32', cLength);
17300    this._cmdf = false;
17301    this._omdf = false;
17302    this._collapsable = this.checkCollapsable();
17303    this._hasOpacity = cLength;
17304    this.initDynamicPropertyContainer(container);
17305    this.prop = PropertyFactory.getProp(elem,data.k,1,null,this);
17306    this.k = this.prop.k;
17307    this.getValue(true);
17308}
17309
17310GradientProperty.prototype.comparePoints = function(values, points) {
17311    var i = 0, len = this.o.length/2, diff;
17312    while(i < len) {
17313        diff = Math.abs(values[i*4] - values[points*4 + i*2]);
17314        if(diff > 0.01){
17315            return false;
17316        }
17317        i += 1;
17318    }
17319    return true;
17320};
17321
17322GradientProperty.prototype.checkCollapsable = function() {
17323    if (this.o.length/2 !== this.c.length/4) {
17324        return false;
17325    }
17326    if (this.data.k.k[0].s) {
17327        var i = 0, len = this.data.k.k.length;
17328        while (i < len) {
17329            if (!this.comparePoints(this.data.k.k[i].s, this.data.p)) {
17330                return false;
17331            }
17332            i += 1;
17333        }
17334    } else if(!this.comparePoints(this.data.k.k, this.data.p)) {
17335        return false;
17336    }
17337    return true;
17338};
17339
17340GradientProperty.prototype.getValue = function(forceRender){
17341    this.prop.getValue();
17342    this._mdf = false;
17343    this._cmdf = false;
17344    this._omdf = false;
17345    if(this.prop._mdf || forceRender){
17346        var i, len = this.data.p*4;
17347        var mult, val;
17348        for(i=0;i<len;i+=1){
17349            mult = i%4 === 0 ? 100 : 255;
17350            val = Math.round(this.prop.v[i]*mult);
17351            if(this.c[i] !== val){
17352                this.c[i] = val;
17353                this._cmdf = !forceRender;
17354            }
17355        }
17356        if(this.o.length){
17357            len = this.prop.v.length;
17358            for(i=this.data.p*4;i<len;i+=1){
17359                mult = i%2 === 0 ? 100 : 1;
17360                val = i%2 === 0 ?  Math.round(this.prop.v[i]*100):this.prop.v[i];
17361                if(this.o[i-this.data.p*4] !== val){
17362                    this.o[i-this.data.p*4] = val;
17363                    this._omdf = !forceRender;
17364                }
17365            }
17366        }
17367        this._mdf = !forceRender;
17368    }
17369};
17370
17371extendPrototype([DynamicPropertyContainer], GradientProperty);
17372var buildShapeString = function(pathNodes, length, closed, mat) {
17373	if(length === 0) {
17374            return '';
17375        }
17376        var _o = pathNodes.o;
17377        var _i = pathNodes.i;
17378        var _v = pathNodes.v;
17379        var i, shapeString = " M" + mat.applyToPointStringified(_v[0][0], _v[0][1]);
17380        for(i = 1; i < length; i += 1) {
17381            shapeString += " C" + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + " " + mat.applyToPointStringified(_i[i][0], _i[i][1]) + " " + mat.applyToPointStringified(_v[i][0], _v[i][1]);
17382        }
17383        if (closed && length) {
17384            shapeString += " C" + mat.applyToPointStringified(_o[i - 1][0], _o[i - 1][1]) + " " + mat.applyToPointStringified(_i[0][0], _i[0][1]) + " " + mat.applyToPointStringified(_v[0][0], _v[0][1]);
17385            shapeString += 'z';
17386        }
17387        return shapeString;
17388}
17389var ImagePreloader = (function(){
17390
17391    var proxyImage = (function(){
17392        var canvas = createTag('canvas');
17393        canvas.width = 1;
17394        canvas.height = 1;
17395        var ctx = canvas.getContext('2d');
17396        ctx.fillStyle = 'rgba(0,0,0,0)';
17397        ctx.fillRect(0, 0, 1, 1);
17398        return canvas;
17399    }())
17400
17401    function imageLoaded(){
17402        this.loadedAssets += 1;
17403        if(this.loadedAssets === this.totalImages){
17404            if(this.imagesLoadedCb) {
17405                this.imagesLoadedCb(null);
17406            }
17407        }
17408    }
17409
17410    function getAssetsPath(assetData, assetsPath, original_path) {
17411        var path = '';
17412        if (assetData.e) {
17413            path = assetData.p;
17414        } else if(assetsPath) {
17415            var imagePath = assetData.p;
17416            if (imagePath.indexOf('images/') !== -1) {
17417                imagePath = imagePath.split('/')[1];
17418            }
17419            path = assetsPath + imagePath;
17420        } else {
17421            path = original_path;
17422            path += assetData.u ? assetData.u : '';
17423            path += assetData.p;
17424        }
17425        return path;
17426    }
17427
17428    function createImageData(assetData) {
17429        var path = getAssetsPath(assetData, this.assetsPath, this.path);
17430        var img = createTag('img');
17431        img.crossOrigin = 'anonymous';
17432        img.addEventListener('load', this._imageLoaded.bind(this), false);
17433        img.addEventListener('error', function() {
17434            ob.img = proxyImage;
17435            this._imageLoaded();
17436        }.bind(this), false);
17437        img.src = path;
17438        var ob = {
17439            img: img,
17440            assetData: assetData
17441        }
17442        return ob;
17443    }
17444
17445    function loadAssets(assets, cb){
17446        this.imagesLoadedCb = cb;
17447        var i, len = assets.length;
17448        for (i = 0; i < len; i += 1) {
17449            if(!assets[i].layers){
17450                this.totalImages += 1;
17451                this.images.push(this._createImageData(assets[i]));
17452            }
17453        }
17454    }
17455
17456    function setPath(path){
17457        this.path = path || '';
17458    }
17459
17460    function setAssetsPath(path){
17461        this.assetsPath = path || '';
17462    }
17463
17464    function getImage(assetData) {
17465        var i = 0, len = this.images.length;
17466        while (i < len) {
17467            if (this.images[i].assetData === assetData) {
17468                return this.images[i].img;
17469            }
17470            i += 1;
17471        }
17472    }
17473
17474    function destroy() {
17475        this.imagesLoadedCb = null;
17476        this.images.length = 0;
17477    }
17478
17479    function loaded() {
17480        return this.totalImages === this.loadedAssets;
17481    }
17482
17483    return function ImagePreloader(){
17484        this.loadAssets = loadAssets;
17485        this.setAssetsPath = setAssetsPath;
17486        this.setPath = setPath;
17487        this.loaded = loaded;
17488        this.destroy = destroy;
17489        this.getImage = getImage;
17490        this._createImageData = createImageData;
17491        this._imageLoaded = imageLoaded;
17492        this.assetsPath = '';
17493        this.path = '';
17494        this.totalImages = 0;
17495        this.loadedAssets = 0;
17496        this.imagesLoadedCb = null;
17497        this.images = [];
17498    };
17499}());
17500var featureSupport = (function(){
17501	var ob = {
17502		maskType: true
17503	};
17504	if (/MSIE 10/i.test(navigator.userAgent) || /MSIE 9/i.test(navigator.userAgent) || /rv:11.0/i.test(navigator.userAgent) || /Edge\/\d./i.test(navigator.userAgent)) {
17505	   ob.maskType = false;
17506	}
17507	return ob;
17508}());
17509var filtersFactory = (function(){
17510	var ob = {};
17511	ob.createFilter = createFilter;
17512	ob.createAlphaToLuminanceFilter = createAlphaToLuminanceFilter;
17513
17514	function createFilter(filId){
17515        	var fil = createNS('filter');
17516        	fil.setAttribute('id',filId);
17517                fil.setAttribute('filterUnits','objectBoundingBox');
17518                fil.setAttribute('x','0%');
17519                fil.setAttribute('y','0%');
17520                fil.setAttribute('width','100%');
17521                fil.setAttribute('height','100%');
17522                return fil;
17523	}
17524
17525	function createAlphaToLuminanceFilter(){
17526                var feColorMatrix = createNS('feColorMatrix');
17527                feColorMatrix.setAttribute('type','matrix');
17528                feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
17529                feColorMatrix.setAttribute('values','0 0 0 1 0  0 0 0 1 0  0 0 0 1 0  0 0 0 1 1');
17530                return feColorMatrix;
17531	}
17532
17533	return ob;
17534}());
17535var assetLoader = (function(){
17536
17537	function formatResponse(xhr) {
17538		if(xhr.response && typeof xhr.response === 'object') {
17539			return xhr.response;
17540		} else if(xhr.response && typeof xhr.response === 'string') {
17541			return JSON.parse(xhr.response);
17542		} else if(xhr.responseText) {
17543			return JSON.parse(xhr.responseText);
17544		}
17545	}
17546
17547	function loadAsset(path, callback, errorCallback) {
17548		var response;
17549		var xhr = new XMLHttpRequest();
17550		xhr.open('GET', path, true);
17551		// set responseType after calling open or IE will break.
17552		try {
17553		    // This crashes on Android WebView prior to KitKat
17554		    xhr.responseType = "json";
17555		} catch (err) {}
17556	    xhr.send();
17557	    xhr.onreadystatechange = function () {
17558	        if (xhr.readyState == 4) {
17559	            if(xhr.status == 200){
17560	            	response = formatResponse(xhr);
17561	            	callback(response);
17562	            }else{
17563	                try{
17564	            		response = formatResponse(xhr);
17565	            		callback(response);
17566	                }catch(err){
17567	                	if(errorCallback) {
17568	                		errorCallback(err);
17569	                	}
17570	                }
17571	            }
17572	        }
17573	    };
17574	}
17575	return {
17576		load: loadAsset
17577	}
17578}())
17579
17580function TextAnimatorProperty(textData, renderType, elem){
17581    this._isFirstFrame = true;
17582	this._hasMaskedPath = false;
17583	this._frameId = -1;
17584	this._textData = textData;
17585	this._renderType = renderType;
17586    this._elem = elem;
vendor: 5,965 bytes, lines 17587-17738
17587	this._animatorsData = createSizedArray(this._textData.a.length);
17588	this._pathData = {};
17589	this._moreOptions = {
17590		alignment: {}
17591	};
17592	this.renderedLetters = [];
17593    this.lettersChangedFlag = false;
17594    this.initDynamicPropertyContainer(elem);
17595
17596}
17597
17598TextAnimatorProperty.prototype.searchProperties = function(){
17599    var i, len = this._textData.a.length, animatorProps;
17600    var getProp = PropertyFactory.getProp;
17601    for(i=0;i<len;i+=1){
17602        animatorProps = this._textData.a[i];
17603        this._animatorsData[i] = new TextAnimatorDataProperty(this._elem, animatorProps, this);
17604    }
17605    if(this._textData.p && 'm' in this._textData.p){
17606        this._pathData = {
17607            f: getProp(this._elem,this._textData.p.f,0,0,this),
17608            l: getProp(this._elem,this._textData.p.l,0,0,this),
17609            r: this._textData.p.r,
17610            m: this._elem.maskManager.getMaskProperty(this._textData.p.m)
17611        };
17612        this._hasMaskedPath = true;
17613    } else {
17614        this._hasMaskedPath = false;
17615    }
17616    this._moreOptions.alignment = getProp(this._elem,this._textData.m.a,1,0,this);
17617};
17618
17619TextAnimatorProperty.prototype.getMeasures = function(documentData, lettersChangedFlag){
17620    this.lettersChangedFlag = lettersChangedFlag;
17621    if(!this._mdf && !this._isFirstFrame && !lettersChangedFlag && (!this._hasMaskedPath || !this._pathData.m._mdf)) {
17622        return;
17623    }
17624    this._isFirstFrame = false;
17625    var alignment = this._moreOptions.alignment.v;
17626    var animators = this._animatorsData;
17627    var textData = this._textData;
17628    var matrixHelper = this.mHelper;
17629    var renderType = this._renderType;
17630    var renderedLettersCount = this.renderedLetters.length;
17631    var data = this.data;
17632    var xPos,yPos;
17633    var i, len;
17634    var letters = documentData.l, pathInfo, currentLength, currentPoint, segmentLength, flag, pointInd, segmentInd, prevPoint, points, segments, partialLength, totalLength, perc, tanAngle, mask;
17635    if(this._hasMaskedPath) {
17636        mask = this._pathData.m;
17637        if(!this._pathData.n || this._pathData._mdf){
17638            var paths = mask.v;
17639            if(this._pathData.r){
17640                paths = paths.reverse();
17641            }
17642            // TODO: release bezier data cached from previous pathInfo: this._pathData.pi
17643            pathInfo = {
17644                tLength: 0,
17645                segments: []
17646            };
17647            len = paths._length - 1;
17648            var bezierData;
17649            totalLength = 0;
17650            for (i = 0; i < len; i += 1) {
17651                bezierData = bez.buildBezierData(paths.v[i]
17652                    , paths.v[i + 1]
17653                    , [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]]
17654                    , [paths.i[i + 1][0] - paths.v[i + 1][0], paths.i[i + 1][1] - paths.v[i + 1][1]]);
17655                pathInfo.tLength += bezierData.segmentLength;
17656                pathInfo.segments.push(bezierData);
17657                totalLength += bezierData.segmentLength;
17658            }
17659            i = len;
17660            if (mask.v.c) {
17661                bezierData = bez.buildBezierData(paths.v[i]
17662                    , paths.v[0]
17663                    , [paths.o[i][0] - paths.v[i][0], paths.o[i][1] - paths.v[i][1]]
17664                    , [paths.i[0][0] - paths.v[0][0], paths.i[0][1] - paths.v[0][1]]);
17665                pathInfo.tLength += bezierData.segmentLength;
17666                pathInfo.segments.push(bezierData);
17667                totalLength += bezierData.segmentLength;
17668            }
17669            this._pathData.pi = pathInfo;
17670        }
17671        pathInfo = this._pathData.pi;
17672
17673        currentLength = this._pathData.f.v;
17674        segmentInd = 0;
17675        pointInd = 1;
17676        segmentLength = 0;
17677        flag = true;
17678        segments = pathInfo.segments;
17679        if (currentLength < 0 && mask.v.c) {
17680            if (pathInfo.tLength < Math.abs(currentLength)) {
17681                currentLength = -Math.abs(currentLength) % pathInfo.tLength;
17682            }
17683            segmentInd = segments.length - 1;
17684            points = segments[segmentInd].points;
17685            pointInd = points.length - 1;
17686            while (currentLength < 0) {
17687                currentLength += points[pointInd].partialLength;
17688                pointInd -= 1;
17689                if (pointInd < 0) {
17690                    segmentInd -= 1;
17691                    points = segments[segmentInd].points;
17692                    pointInd = points.length - 1;
17693                }
17694            }
17695
17696        }
17697        points = segments[segmentInd].points;
17698        prevPoint = points[pointInd - 1];
17699        currentPoint = points[pointInd];
17700        partialLength = currentPoint.partialLength;
17701    }
17702
17703
17704    len = letters.length;
17705    xPos = 0;
17706    yPos = 0;
17707    var yOff = documentData.finalSize * 1.2 * 0.714;
17708    var firstLine = true;
17709    var animatorProps, animatorSelector;
17710    var j, jLen;
17711    var letterValue;
17712
17713    jLen = animators.length;
17714    var lastLetter;
17715
17716    var mult, ind = -1, offf, xPathPos, yPathPos;
17717    var initPathPos = currentLength,initSegmentInd = segmentInd, initPointInd = pointInd, currentLine = -1;
17718    var elemOpacity;
17719    var sc,sw,fc,k;
17720    var lineLength = 0;
17721    var letterSw, letterSc, letterFc, letterM = '', letterP = this.defaultPropsArray, letterO;
17722
17723    //
17724    if(documentData.j === 2 || documentData.j === 1) {
17725        var animatorJustifyOffset = 0;
17726        var animatorFirstCharOffset = 0;
17727        var justifyOffsetMult = documentData.j === 2 ? -0.5 : -1;
17728        var lastIndex = 0;
17729        var isNewLine = true;
17730
17731        for (i = 0; i < len; i += 1) {
17732            if (letters[i].n) {
17733                if(animatorJustifyOffset) {
17734                    animatorJustifyOffset += animatorFirstCharOffset;
17735                }
17736                while (lastIndex < i) {
17737                    letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
17738                    lastIndex += 1;
vendor: 1,293 bytes, lines 17739-17766
17739                }
17740                animatorJustifyOffset = 0;
17741                isNewLine = true;
17742            } else {
17743                for (j = 0; j < jLen; j += 1) {
17744                    animatorProps = animators[j].a;
17745                    if (animatorProps.t.propType) {
17746                        if (isNewLine && documentData.j === 2) {
17747                            animatorFirstCharOffset += animatorProps.t.v * justifyOffsetMult;
17748                        }
17749                        animatorSelector = animators[j].s;
17750                        mult = animatorSelector.getMult(letters[i].anIndexes[j], textData.a[j].s.totalChars);
17751                        if (mult.length) {
17752                            animatorJustifyOffset += animatorProps.t.v*mult[0] * justifyOffsetMult;
17753                        } else {
17754                            animatorJustifyOffset += animatorProps.t.v*mult * justifyOffsetMult;
17755                        }
17756                    }
17757                }
17758                isNewLine = false;
17759            }
17760        }
17761        if(animatorJustifyOffset) {
17762            animatorJustifyOffset += animatorFirstCharOffset;
17763        }
17764        while(lastIndex < i) {
17765            letters[lastIndex].animatorJustifyOffset = animatorJustifyOffset;
17766            lastIndex += 1;
vendor: 5,430 bytes, lines 17767-17884
17767        }
17768    }
17769    //
17770
17771    for( i = 0; i < len; i += 1) {
17772
17773        matrixHelper.reset();
17774        elemOpacity = 1;
17775        if(letters[i].n) {
17776            xPos = 0;
17777            yPos += documentData.yOffset;
17778            yPos += firstLine ? 1 : 0;
17779            currentLength = initPathPos ;
17780            firstLine = false;
17781            lineLength = 0;
17782            if(this._hasMaskedPath) {
17783                segmentInd = initSegmentInd;
17784                pointInd = initPointInd;
17785                points = segments[segmentInd].points;
17786                prevPoint = points[pointInd - 1];
17787                currentPoint = points[pointInd];
17788                partialLength = currentPoint.partialLength;
17789                segmentLength = 0;
17790            }
17791            letterO = letterSw = letterFc = letterM = '';
17792            letterP = this.defaultPropsArray;
17793        }else{
17794            if(this._hasMaskedPath) {
17795                if(currentLine !== letters[i].line){
17796                    switch(documentData.j){
17797                        case 1:
17798                            currentLength += totalLength - documentData.lineWidths[letters[i].line];
17799                            break;
17800                        case 2:
17801                            currentLength += (totalLength - documentData.lineWidths[letters[i].line])/2;
17802                            break;
17803                    }
17804                    currentLine = letters[i].line;
17805                }
17806                if (ind !== letters[i].ind) {
17807                    if (letters[ind]) {
17808                        currentLength += letters[ind].extra;
17809                    }
17810                    currentLength += letters[i].an / 2;
17811                    ind = letters[i].ind;
17812                }
17813                currentLength += alignment[0] * letters[i].an / 200;
17814                var animatorOffset = 0;
17815                for (j = 0; j < jLen; j += 1) {
17816                    animatorProps = animators[j].a;
17817                    if (animatorProps.p.propType) {
17818                        animatorSelector = animators[j].s;
17819                        mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17820                        if(mult.length){
17821                            animatorOffset += animatorProps.p.v[0] * mult[0];
17822                        } else{
17823                            animatorOffset += animatorProps.p.v[0] * mult;
17824                        }
17825
17826                    }
17827                    if (animatorProps.a.propType) {
17828                        animatorSelector = animators[j].s;
17829                        mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17830                        if(mult.length){
17831                            animatorOffset += animatorProps.a.v[0] * mult[0];
17832                        } else{
17833                            animatorOffset += animatorProps.a.v[0] * mult;
17834                        }
17835
17836                    }
17837                }
17838                flag = true;
17839                while (flag) {
17840                    if (segmentLength + partialLength >= currentLength + animatorOffset || !points) {
17841                        perc = (currentLength + animatorOffset - segmentLength) / currentPoint.partialLength;
17842                        xPathPos = prevPoint.point[0] + (currentPoint.point[0] - prevPoint.point[0]) * perc;
17843                        yPathPos = prevPoint.point[1] + (currentPoint.point[1] - prevPoint.point[1]) * perc;
17844                        matrixHelper.translate(-alignment[0]*letters[i].an/200, -(alignment[1] * yOff / 100));
17845                        flag = false;
17846                    } else if (points) {
17847                        segmentLength += currentPoint.partialLength;
17848                        pointInd += 1;
17849                        if (pointInd >= points.length) {
17850                            pointInd = 0;
17851                            segmentInd += 1;
17852                            if (!segments[segmentInd]) {
17853                                if (mask.v.c) {
17854                                    pointInd = 0;
17855                                    segmentInd = 0;
17856                                    points = segments[segmentInd].points;
17857                                } else {
17858                                    segmentLength -= currentPoint.partialLength;
17859                                    points = null;
17860                                }
17861                            } else {
17862                                points = segments[segmentInd].points;
17863                            }
17864                        }
17865                        if (points) {
17866                            prevPoint = currentPoint;
17867                            currentPoint = points[pointInd];
17868                            partialLength = currentPoint.partialLength;
17869                        }
17870                    }
17871                }
17872                offf = letters[i].an / 2 - letters[i].add;
17873                matrixHelper.translate(-offf, 0, 0);
17874            } else {
17875                offf = letters[i].an/2 - letters[i].add;
17876                matrixHelper.translate(-offf,0,0);
17877
17878                // Grouping alignment
17879                matrixHelper.translate(-alignment[0]*letters[i].an/200, -alignment[1]*yOff/100, 0);
17880            }
17881
17882            lineLength += letters[i].l/2;
17883            for(j=0;j<jLen;j+=1){
17884                animatorProps = animators[j].a;
vendor: 8,689 bytes, lines 17885-18061
17885                if (animatorProps.t.propType) {
17886                    animatorSelector = animators[j].s;
17887                    mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17888                    //This condition is to prevent applying tracking to first character in each line. Might be better to use a boolean "isNewLine"
17889                    if(xPos !== 0 || documentData.j !== 0) {
17890                        if(this._hasMaskedPath) {
17891                            if(mult.length) {
17892                                currentLength += animatorProps.t.v*mult[0];
17893                            } else {
17894                                currentLength += animatorProps.t.v*mult;
17895                            }
17896                        }else{
17897                            if(mult.length) {
17898                                xPos += animatorProps.t.v*mult[0];
17899                            } else {
17900                                xPos += animatorProps.t.v*mult;
17901                            }
17902                        }
17903                    }
17904                }
17905            }
17906            lineLength += letters[i].l/2;
17907            if(documentData.strokeWidthAnim) {
17908                sw = documentData.sw || 0;
17909            }
17910            if(documentData.strokeColorAnim) {
17911                if(documentData.sc){
17912                    sc = [documentData.sc[0], documentData.sc[1], documentData.sc[2]];
17913                }else{
17914                    sc = [0,0,0];
17915                }
17916            }
17917            if(documentData.fillColorAnim && documentData.fc) {
17918                fc = [documentData.fc[0], documentData.fc[1], documentData.fc[2]];
17919            }
17920            for(j=0;j<jLen;j+=1){
17921                animatorProps = animators[j].a;
17922                if (animatorProps.a.propType) {
17923                    animatorSelector = animators[j].s;
17924                    mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17925
17926                    if(mult.length){
17927                        matrixHelper.translate(-animatorProps.a.v[0]*mult[0], -animatorProps.a.v[1]*mult[1], animatorProps.a.v[2]*mult[2]);
17928                    } else {
17929                        matrixHelper.translate(-animatorProps.a.v[0]*mult, -animatorProps.a.v[1]*mult, animatorProps.a.v[2]*mult);
17930                    }
17931                }
17932            }
17933            for(j=0;j<jLen;j+=1){
17934                animatorProps = animators[j].a;
17935                if (animatorProps.s.propType) {
17936                    animatorSelector = animators[j].s;
17937                    mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17938                    if(mult.length){
17939                        matrixHelper.scale(1+((animatorProps.s.v[0]-1)*mult[0]),1+((animatorProps.s.v[1]-1)*mult[1]),1);
17940                    } else {
17941                        matrixHelper.scale(1+((animatorProps.s.v[0]-1)*mult),1+((animatorProps.s.v[1]-1)*mult),1);
17942                    }
17943                }
17944            }
17945            for(j=0;j<jLen;j+=1) {
17946                animatorProps = animators[j].a;
17947                animatorSelector = animators[j].s;
17948                mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
17949                if (animatorProps.sk.propType) {
17950                    if(mult.length) {
17951                        matrixHelper.skewFromAxis(-animatorProps.sk.v * mult[0], animatorProps.sa.v * mult[1]);
17952                    } else {
17953                        matrixHelper.skewFromAxis(-animatorProps.sk.v * mult, animatorProps.sa.v * mult);
17954                    }
17955                }
17956                if (animatorProps.r.propType) {
17957                    if(mult.length) {
17958                        matrixHelper.rotateZ(-animatorProps.r.v * mult[2]);
17959                    } else {
17960                        matrixHelper.rotateZ(-animatorProps.r.v * mult);
17961                    }
17962                }
17963                if (animatorProps.ry.propType) {
17964
17965                    if(mult.length) {
17966                        matrixHelper.rotateY(animatorProps.ry.v*mult[1]);
17967                    }else{
17968                        matrixHelper.rotateY(animatorProps.ry.v*mult);
17969                    }
17970                }
17971                if (animatorProps.rx.propType) {
17972                    if(mult.length) {
17973                        matrixHelper.rotateX(animatorProps.rx.v*mult[0]);
17974                    } else {
17975                        matrixHelper.rotateX(animatorProps.rx.v*mult);
17976                    }
17977                }
17978                if (animatorProps.o.propType) {
17979                    if(mult.length) {
17980                        elemOpacity += ((animatorProps.o.v)*mult[0] - elemOpacity)*mult[0];
17981                    } else {
17982                        elemOpacity += ((animatorProps.o.v)*mult - elemOpacity)*mult;
17983                    }
17984                }
17985                if (documentData.strokeWidthAnim && animatorProps.sw.propType) {
17986                    if(mult.length) {
17987                        sw += animatorProps.sw.v*mult[0];
17988                    } else {
17989                        sw += animatorProps.sw.v*mult;
17990                    }
17991                }
17992                if (documentData.strokeColorAnim && animatorProps.sc.propType) {
17993                    for(k=0;k<3;k+=1){
17994                        if(mult.length) {
17995                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult[0];
17996                        } else {
17997                            sc[k] = sc[k] + (animatorProps.sc.v[k] - sc[k])*mult;
17998                        }
17999                    }
18000                }
18001                if (documentData.fillColorAnim && documentData.fc) {
18002                    if(animatorProps.fc.propType){
18003                        for(k=0;k<3;k+=1){
18004                            if(mult.length) {
18005                                fc[k] = fc[k] + (animatorProps.fc.v[k] - fc[k])*mult[0];
18006                            } else {
18007                                fc[k] = fc[k] + (animatorProps.fc.v[k] - fc[k])*mult;
18008                            }
18009                        }
18010                    }
18011                    if(animatorProps.fh.propType){
18012                        if(mult.length) {
18013                            fc = addHueToRGB(fc,animatorProps.fh.v*mult[0]);
18014                        } else {
18015                            fc = addHueToRGB(fc,animatorProps.fh.v*mult);
18016                        }
18017                    }
18018                    if(animatorProps.fs.propType){
18019                        if(mult.length) {
18020                            fc = addSaturationToRGB(fc,animatorProps.fs.v*mult[0]);
18021                        } else {
18022                            fc = addSaturationToRGB(fc,animatorProps.fs.v*mult);
18023                        }
18024                    }
18025                    if(animatorProps.fb.propType){
18026                        if(mult.length) {
18027                            fc = addBrightnessToRGB(fc,animatorProps.fb.v*mult[0]);
18028                        } else {
18029                            fc = addBrightnessToRGB(fc,animatorProps.fb.v*mult);
18030                        }
18031                    }
18032                }
18033            }
18034
18035            for(j=0;j<jLen;j+=1){
18036                animatorProps = animators[j].a;
18037
18038                if (animatorProps.p.propType) {
18039                    animatorSelector = animators[j].s;
18040                    mult = animatorSelector.getMult(letters[i].anIndexes[j],textData.a[j].s.totalChars);
18041                    if(this._hasMaskedPath) {
18042                        if(mult.length) {
18043                            matrixHelper.translate(0, animatorProps.p.v[1] * mult[0], -animatorProps.p.v[2] * mult[1]);
18044                        } else {
18045                            matrixHelper.translate(0, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
18046                        }
18047                    }else{
18048                        if(mult.length) {
18049                            matrixHelper.translate(animatorProps.p.v[0] * mult[0], animatorProps.p.v[1] * mult[1], -animatorProps.p.v[2] * mult[2]);
18050                        } else {
18051                            matrixHelper.translate(animatorProps.p.v[0] * mult, animatorProps.p.v[1] * mult, -animatorProps.p.v[2] * mult);
18052                        
18053                        }
18054                    }
18055                }
18056            }
18057            if(documentData.strokeWidthAnim){
18058                letterSw = sw < 0 ? 0 : sw;
18059            }
18060            if(documentData.strokeColorAnim){
18061                letterSc = 'rgb('+Math.round(sc[0]*255)+','+Math.round(sc[1]*255)+','+Math.round(sc[2]*255
vendor: 8,683 bytes, lines 18061-18283
18061)+')';
18062            }
18063            if(documentData.fillColorAnim && documentData.fc){
18064                letterFc = 'rgb('+Math.round(fc[0]*255)+','+Math.round(fc[1]*255)+','+Math.round(fc[2]*255)+')';
18065            }
18066
18067            if(this._hasMaskedPath) {
18068                matrixHelper.translate(0,-documentData.ls);
18069
18070                matrixHelper.translate(0, alignment[1]*yOff/100 + yPos,0);
18071                if (textData.p.p) {
18072                    tanAngle = (currentPoint.point[1] - prevPoint.point[1]) / (currentPoint.point[0] - prevPoint.point[0]);
18073                    var rot = Math.atan(tanAngle) * 180 / Math.PI;
18074                    if (currentPoint.point[0] < prevPoint.point[0]) {
18075                        rot += 180;
18076                    }
18077                    matrixHelper.rotate(-rot * Math.PI / 180);
18078                }
18079                matrixHelper.translate(xPathPos, yPathPos, 0);
18080                currentLength -= alignment[0]*letters[i].an/200;
18081                if(letters[i+1] && ind !== letters[i+1].ind){
18082                    currentLength += letters[i].an / 2;
18083                    currentLength += documentData.tr/1000*documentData.finalSize;
18084                }
18085            }else{
18086
18087                matrixHelper.translate(xPos,yPos,0);
18088
18089                if(documentData.ps){
18090                    //matrixHelper.translate(documentData.ps[0],documentData.ps[1],0);
18091                    matrixHelper.translate(documentData.ps[0],documentData.ps[1] + documentData.ascent,0);
18092                }
18093                switch(documentData.j){
18094                    case 1:
18095                        matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line]),0,0);
18096                        break;
18097                    case 2:
18098                        matrixHelper.translate(letters[i].animatorJustifyOffset + documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[letters[i].line])/2,0,0);
18099                        break;
18100                }
18101                matrixHelper.translate(0,-documentData.ls);
18102                matrixHelper.translate(offf,0,0);
18103                matrixHelper.translate(alignment[0]*letters[i].an/200,alignment[1]*yOff/100,0);
18104                xPos += letters[i].l + documentData.tr/1000*documentData.finalSize;
18105            }
18106            if(renderType === 'html'){
18107                letterM = matrixHelper.toCSS();
18108            }else if(renderType === 'svg'){
18109                letterM = matrixHelper.to2dCSS();
18110            }else{
18111                letterP = [matrixHelper.props[0],matrixHelper.props[1],matrixHelper.props[2],matrixHelper.props[3],matrixHelper.props[4],matrixHelper.props[5],matrixHelper.props[6],matrixHelper.props[7],matrixHelper.props[8],matrixHelper.props[9],matrixHelper.props[10],matrixHelper.props[11],matrixHelper.props[12],matrixHelper.props[13],matrixHelper.props[14],matrixHelper.props[15]];
18112            }
18113            letterO = elemOpacity;
18114        }
18115
18116        if(renderedLettersCount <= i) {
18117            letterValue = new LetterProps(letterO,letterSw,letterSc,letterFc,letterM,letterP);
18118            this.renderedLetters.push(letterValue);
18119            renderedLettersCount += 1;
18120            this.lettersChangedFlag = true;
18121        } else {
18122            letterValue = this.renderedLetters[i];
18123            this.lettersChangedFlag = letterValue.update(letterO, letterSw, letterSc, letterFc, letterM, letterP) || this.lettersChangedFlag;
18124        }
18125    }
18126};
18127
18128TextAnimatorProperty.prototype.getValue = function(){
18129	if(this._elem.globalData.frameId === this._frameId){
18130        return;
18131    }
18132    this._frameId = this._elem.globalData.frameId;
18133    this.iterateDynamicProperties();
18134};
18135
18136TextAnimatorProperty.prototype.mHelper = new Matrix();
18137TextAnimatorProperty.prototype.defaultPropsArray = [];
18138extendPrototype([DynamicPropertyContainer], TextAnimatorProperty);
18139function TextAnimatorDataProperty(elem, animatorProps, container) {
18140	var defaultData = {propType:false};
18141	var getProp = PropertyFactory.getProp;
18142	var textAnimator_animatables = animatorProps.a;
18143	this.a = {
18144		r: textAnimator_animatables.r ? getProp(elem, textAnimator_animatables.r, 0, degToRads, container) : defaultData,
18145		rx: textAnimator_animatables.rx ? getProp(elem, textAnimator_animatables.rx, 0, degToRads, container) : defaultData,
18146		ry: textAnimator_animatables.ry ? getProp(elem, textAnimator_animatables.ry, 0, degToRads, container) : defaultData,
18147		sk: textAnimator_animatables.sk ? getProp(elem, textAnimator_animatables.sk, 0, degToRads, container) : defaultData,
18148		sa: textAnimator_animatables.sa ? getProp(elem, textAnimator_animatables.sa, 0, degToRads, container) : defaultData,
18149		s: textAnimator_animatables.s ? getProp(elem, textAnimator_animatables.s, 1, 0.01, container) : defaultData,
18150		a: textAnimator_animatables.a ? getProp(elem, textAnimator_animatables.a, 1, 0, container) : defaultData,
18151		o: textAnimator_animatables.o ? getProp(elem, textAnimator_animatables.o, 0, 0.01, container) : defaultData,
18152		p: textAnimator_animatables.p ? getProp(elem,textAnimator_animatables.p, 1, 0, container) : defaultData,
18153		sw: textAnimator_animatables.sw ? getProp(elem, textAnimator_animatables.sw, 0, 0, container) : defaultData,
18154		sc: textAnimator_animatables.sc ? getProp(elem, textAnimator_animatables.sc, 1, 0, container) : defaultData,
18155		fc: textAnimator_animatables.fc ? getProp(elem, textAnimator_animatables.fc, 1, 0, container) : defaultData,
18156		fh: textAnimator_animatables.fh ? getProp(elem, textAnimator_animatables.fh, 0, 0, container) : defaultData,
18157		fs: textAnimator_animatables.fs ? getProp(elem, textAnimator_animatables.fs, 0, 0.01, container) : defaultData,
18158		fb: textAnimator_animatables.fb ? getProp(elem, textAnimator_animatables.fb, 0, 0.01, container) : defaultData,
18159		t: textAnimator_animatables.t ? getProp(elem, textAnimator_animatables.t, 0, 0, container) : defaultData
18160	};
18161
18162	this.s = TextSelectorProp.getTextSelectorProp(elem,animatorProps.s, container);
18163    this.s.t = animatorProps.s.t;
18164}
18165function LetterProps(o, sw, sc, fc, m, p){
18166    this.o = o;
18167    this.sw = sw;
18168    this.sc = sc;
18169    this.fc = fc;
18170    this.m = m;
18171    this.p = p;
18172    this._mdf = {
18173    	o: true,
18174    	sw: !!sw,
18175    	sc: !!sc,
18176    	fc: !!fc,
18177    	m: true,
18178    	p: true
18179    };
18180}
18181
18182LetterProps.prototype.update = function(o, sw, sc, fc, m, p) {
18183	this._mdf.o = false;
18184	this._mdf.sw = false;
18185	this._mdf.sc = false;
18186	this._mdf.fc = false;
18187	this._mdf.m = false;
18188	this._mdf.p = false;
18189	var updated = false;
18190
18191	if(this.o !== o) {
18192		this.o = o;
18193		this._mdf.o = true;
18194		updated = true;
18195	}
18196	if(this.sw !== sw) {
18197		this.sw = sw;
18198		this._mdf.sw = true;
18199		updated = true;
18200	}
18201	if(this.sc !== sc) {
18202		this.sc = sc;
18203		this._mdf.sc = true;
18204		updated = true;
18205	}
18206	if(this.fc !== fc) {
18207		this.fc = fc;
18208		this._mdf.fc = true;
18209		updated = true;
18210	}
18211	if(this.m !== m) {
18212		this.m = m;
18213		this._mdf.m = true;
18214		updated = true;
18215	}
18216	if(p.length && (this.p[0] !== p[0] || this.p[1] !== p[1] || this.p[4] !== p[4] || this.p[5] !== p[5] || this.p[12] !== p[12] || this.p[13] !== p[13])) {
18217		this.p = p;
18218		this._mdf.p = true;
18219		updated = true;
18220	}
18221	return updated;
18222};
18223function TextProperty(elem, data){
18224	this._frameId = initialDefaultFrame;
18225	this.pv = '';
18226	this.v = '';
18227	this.kf = false;
18228	this._isFirstFrame = true;
18229	this._mdf = false;
18230    this.data = data;
18231	this.elem = elem;
18232    this.comp = this.elem.comp;
18233	this.keysIndex = 0;
18234    this.canResize = false;
18235    this.minimumFontSize = 1;
18236    this.effectsSequence = [];
18237	this.currentData = {
18238		ascent: 0,
18239        boxWidth: this.defaultBoxWidth,
18240        f: '',
18241        fStyle: '',
18242        fWeight: '',
18243        fc: '',
18244        j: '',
18245        justifyOffset: '',
18246        l: [],
18247        lh: 0,
18248        lineWidths: [],
18249        ls: '',
18250        of: '',
18251        s: '',
18252        sc: '',
18253        sw: 0,
18254        t: 0,
18255        tr: 0,
18256        sz:0,
18257        ps:null,
18258        fillColorAnim: false,
18259        strokeColorAnim: false,
18260        strokeWidthAnim: false,
18261        yOffset: 0,
18262        finalSize:0,
18263        finalText:[],
18264        finalLineHeight: 0,
18265        __complete: false
18266
18267	};
18268    this.copyData(this.currentData, this.data.d.k[0].s);
18269
18270    if(!this.searchProperty()) {
18271        this.completeTextData(this.currentData);
18272    }
18273}
18274
18275TextProperty.prototype.defaultBoxWidth = [0,0];
18276
18277TextProperty.prototype.copyData = function(obj, data) {
18278    for(var s in data) {
18279        if(data.hasOwnProperty(s)) {
18280            obj[s] = data[s];
18281        }
18282    }
18283    return obj;
18284}
18285
18286TextProperty.prototype.setCurrentData = function(data){
18287    if(!data.__complete) {
18288        this.completeTextData(data);
18289    }
18290    this.currentData = data;
18291    this.currentData.boxWidth = this.currentData.boxWidth || this.defaultBoxWidth;
18292    this._mdf = true;
18293};
18294
18295TextProperty.prototype.searchProperty = function() {
18296    return this.searchKeyframes();
18297};
18298
18299TextProperty.prototype.searchKeyframes = function() {
18300    this.kf = this.data.d.k.length > 1;
18301    if(this.kf) {
18302        this.addEffect(this.getKeyframeValue.bind(this));
18303    }
18304    return this.kf;
18305}
18306
18307TextProperty.prototype.addEffect = function(effectFunction) {
18308	this.effectsSequence.push(effectFunction);
18309    this.elem.addDynamicProperty(this);
18310};
18311
18312TextProperty.prototype.getValue = function(_finalValue) {
18313    if((this.elem.globalData.frameId === this.frameId || !this.effectsSequence.length) && !_finalValue) {
18314        return;
18315    }
18316    this.currentData.t = this.data.d.k[this.keysIndex].s.t;
18317    var currentValue = this.currentData;
18318    var currentIndex = this.keysIndex;
18319    if(this.lock) {
18320        this.setCurrentData(this.currentData);
18321        return;
18322    }
18323    this.lock = true;
18324    this._mdf = false;
18325    var multipliedValue;
18326    var i, len = this.effectsSequence.length;
18327    var finalValue = _finalValue || this.data.d.k[this.keysIndex].s;
18328    for(i = 0; i < len; i += 1) {
18329        //Checking if index changed to prevent creating a new object every time the expression updates.
18330        if(currentIndex !== this.keysIndex) {
18331            finalValue = this.effectsSequence[i](finalValue, finalValue.t);
18332        } else {
18333            finalValue = this.effectsSequence[i](this.currentData, finalValue.t);
18334        }
18335    }
18336    if(currentValue !== finalValue) {
18337        this.setCurrentData(finalValue);
18338    }
18339    this.pv = this.v = this.currentData;
18340    this.lock = false;
18341    this.frameId = this.elem.globalData.frameId;
18342}
18343
18344TextProperty.prototype.getKeyframeValue = function() {
18345    var textKeys = this.data.d.k, textDocumentData;
18346    var frameNum = this.elem.comp.renderedFrame;
18347    var i = 0, len = textKeys.length;
18348    while(i <= len - 1) {
18349        textDocumentData = textKeys[i].s;
18350        if(i === len - 1 || textKeys[i+1].t > frameNum){
18351            break;
18352        }
18353        i += 1;
18354    }
18355    if(this.keysIndex !== i) {
18356        this.keysIndex = i;
18357    }
18358    return this.data.d.k[this.keysIndex].s;
18359};
18360
18361TextProperty.prototype.buildFinalText = function(text) {
18362    var combinedCharacters = FontManager.getCombinedCharacterCodes();
18363    var charactersArray = [];
18364    var i = 0, len = text.length;
18365    var charCode;
18366    while (i < len) {
18367        charCode = text.charCodeAt(i);
18368        if (combinedCharacters.indexOf(charCode) !== -1) {
18369            charactersArray[charactersArray.length - 1] += text.charAt(i);
18370        } else {
18371            if (charCode >= 0xD800 && charCode <= 0xDBFF) {
18372                charCode = text.charCodeAt(i + 1);
18373                if (charCode >= 0xDC00 && charCode <= 0xDFFF) {
18374                    charactersArray.push(text.substr(i, 2));
18375                    ++i;
18376                } else {
18377                    charactersArray.push(text.charAt(i));
18378                }
18379            } else {
18380                charactersArray.push(text.charAt(i));
18381            }
18382        }
18383        i += 1;
18384    }
18385    return charactersArray;
18386}
18387
18388TextProperty.prototype.completeTextData = function(documentData) {
18389    documentData.__complete = true;
18390    var fontManager = this.elem.globalData.fontManager;
18391    var data = this.data;
18392    var letters = [];
18393    var i, len;
18394    var newLineFlag, index = 0, val;
18395    var anchorGrouping = data.m.g;
18396    var currentSize = 0, currentPos = 0, currentLine = 0, lineWidths = [];
18397    var lineWidth = 0;
18398    var maxLineWidth = 0;
18399    var j, jLen;
18400    var fontData = fontManager.getFontByName(documentData.f);
18401    var charData, cLength = 0;
18402    var styles = fontData.fStyle ? fontData.fStyle.split(' ') : [];
18403
18404    var fWeight = 'normal', fStyle = 'normal';
18405    len = styles.length;
18406    var styleName;
18407    for(i=0;i<len;i+=1){
18408        styleName = styles[i].toLowerCase();
18409        switch(styleName) {
18410            case 'italic':
18411            fStyle = 'italic';
18412            break;
18413            case 'bold':
18414            fWeight = '700';
18415            break;
18416            case 'black':
18417            fWeight = '900';
18418            break;
18419            case 'medium':
18420            fWeight = '500';
18421            break;
18422            case 'regular':
18423            case 'normal':
18424            fWeight = '400';
18425            break;
18426            case 'light':
18427            case 'thin':
18428            fWeight = '200';
18429            break;
18430        }
18431    }
18432    documentData.fWeight = fontData.fWeight || fWeight;
18433    documentData.fStyle = fStyle;
18434    documentData.finalSize = documentData.s;
18435    documentData.finalText = this.buildFinalText(documentData.t);
18436    len = documentData.finalText.length;
18437    documentData.finalLineHeight = documentData.lh;
18438    var trackingOffset = documentData.tr/1000*documentData.finalSize;
vendor: 4,512 bytes, lines 18439-18535
18439    var charCode;
18440    if(documentData.sz){
18441        var flag = true;
18442        var boxWidth = documentData.sz[0];
18443        var boxHeight = documentData.sz[1];
18444        var currentHeight, finalText;
18445        while(flag) {
18446            finalText = this.buildFinalText(documentData.t);
18447            currentHeight = 0;
18448            lineWidth = 0;
18449            len = finalText.length;
18450            trackingOffset = documentData.tr/1000*documentData.finalSize;
18451            var lastSpaceIndex = -1;
18452            for(i=0;i<len;i+=1){
18453                charCode = finalText[i].charCodeAt(0);
18454                newLineFlag = false;
18455                if(finalText[i] === ' '){
18456                    lastSpaceIndex = i;
18457                }else if(charCode === 13 || charCode === 3){
18458                    lineWidth = 0;
18459                    newLineFlag = true;
18460                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
18461                }
18462                if(fontManager.chars){
18463                    charData = fontManager.getCharData(finalText[i], fontData.fStyle, fontData.fFamily);
18464                    cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
18465                }else{
18466                    //tCanvasHelper.font = documentData.s + 'px '+ fontData.fFamily;
18467                    cLength = fontManager.measureText(finalText[i], documentData.f, documentData.finalSize);
18468                }
18469                if(lineWidth + cLength > boxWidth && finalText[i] !== ' '){
18470                    if(lastSpaceIndex === -1){
18471                        len += 1;
18472                    } else {
18473                        i = lastSpaceIndex;
18474                    }
18475                    currentHeight += documentData.finalLineHeight || documentData.finalSize*1.2;
18476                    finalText.splice(i, lastSpaceIndex === i ? 1 : 0,"\r");
18477                    //finalText = finalText.substr(0,i) + "\r" + finalText.substr(i === lastSpaceIndex ? i + 1 : i);
18478                    lastSpaceIndex = -1;
18479                    lineWidth = 0;
18480                }else {
18481                    lineWidth += cLength;
18482                    lineWidth += trackingOffset;
18483                }
18484            }
18485            currentHeight += fontData.ascent*documentData.finalSize/100;
18486            if(this.canResize && documentData.finalSize > this.minimumFontSize && boxHeight < currentHeight) {
18487                documentData.finalSize -= 1;
18488                documentData.finalLineHeight = documentData.finalSize * documentData.lh / documentData.s;
18489            } else {
18490                documentData.finalText = finalText;
18491                len = documentData.finalText.length;
18492                flag = false;
18493            }
18494        }
18495
18496    }
18497    lineWidth = - trackingOffset;
18498    cLength = 0;
18499    var uncollapsedSpaces = 0;
18500    var currentChar;
18501    for (i = 0;i < len ;i += 1) {
18502        newLineFlag = false;
18503        currentChar = documentData.finalText[i];
18504        charCode = currentChar.charCodeAt(0);
18505        if (currentChar === ' '){
18506            val = '\u00A0';
18507        } else if (charCode === 13 || charCode === 3) {
18508            uncollapsedSpaces = 0;
18509            lineWidths.push(lineWidth);
18510            maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
18511            lineWidth = - 2 * trackingOffset;
18512            val = '';
18513            newLineFlag = true;
18514            currentLine += 1;
18515        }else{
18516            val = documentData.finalText[i];
18517        }
18518        if(fontManager.chars){
18519            charData = fontManager.getCharData(currentChar, fontData.fStyle, fontManager.getFontByName(documentData.f).fFamily);
18520            cLength = newLineFlag ? 0 : charData.w*documentData.finalSize/100;
18521        }else{
18522            //var charWidth = fontManager.measureText(val, documentData.f, documentData.finalSize);
18523            //tCanvasHelper.font = documentData.finalSize + 'px '+ fontManager.getFontByName(documentData.f).fFamily;
18524            cLength = fontManager.measureText(val, documentData.f, documentData.finalSize);
18525        }
18526
18527        //
18528        if(currentChar === ' '){
18529            uncollapsedSpaces += cLength + trackingOffset;
18530        } else {
18531            lineWidth += cLength + trackingOffset + uncollapsedSpaces;
18532            uncollapsedSpaces = 0;
18533        }
18534        letters.push({l:cLength,an:cLength,add:currentSize,n:newLineFlag, anIndexes:[], val: val, line: currentLine, animatorJustifyOffset: 0});
18535        if(anchorGrouping == 2){
vendor: 27,753 bytes, lines 18536-19397
18536            currentSize += cLength;
18537            if(val === '' || val === '\u00A0' || i === len - 1){
18538                if(val === '' || val === '\u00A0'){
18539                    currentSize -= cLength;
18540                }
18541                while(currentPos<=i){
18542                    letters[currentPos].an = currentSize;
18543                    letters[currentPos].ind = index;
18544                    letters[currentPos].extra = cLength;
18545                    currentPos += 1;
18546                }
18547                index += 1;
18548                currentSize = 0;
18549            }
18550        }else if(anchorGrouping == 3){
18551            currentSize += cLength;
18552            if(val === '' || i === len - 1){
18553                if(val === ''){
18554                    currentSize -= cLength;
18555                }
18556                while(currentPos<=i){
18557                    letters[currentPos].an = currentSize;
18558                    letters[currentPos].ind = index;
18559                    letters[currentPos].extra = cLength;
18560                    currentPos += 1;
18561                }
18562                currentSize = 0;
18563                index += 1;
18564            }
18565        }else{
18566            letters[index].ind = index;
18567            letters[index].extra = 0;
18568            index += 1;
18569        }
18570    }
18571    documentData.l = letters;
18572    maxLineWidth = lineWidth > maxLineWidth ? lineWidth : maxLineWidth;
18573    lineWidths.push(lineWidth);
18574    if(documentData.sz){
18575        documentData.boxWidth = documentData.sz[0];
18576        documentData.justifyOffset = 0;
18577    }else{
18578        documentData.boxWidth = maxLineWidth;
18579        switch(documentData.j){
18580            case 1:
18581                documentData.justifyOffset = - documentData.boxWidth;
18582                break;
18583            case 2:
18584                documentData.justifyOffset = - documentData.boxWidth/2;
18585                break;
18586            default:
18587                documentData.justifyOffset = 0;
18588        }
18589    }
18590    documentData.lineWidths = lineWidths;
18591
18592    var animators = data.a, animatorData, letterData;
18593    jLen = animators.length;
18594    var based, ind, indexes = [];
18595    for(j=0;j<jLen;j+=1){
18596        animatorData = animators[j];
18597        if(animatorData.a.sc){
18598            documentData.strokeColorAnim = true;
18599        }
18600        if(animatorData.a.sw){
18601            documentData.strokeWidthAnim = true;
18602        }
18603        if(animatorData.a.fc || animatorData.a.fh || animatorData.a.fs || animatorData.a.fb){
18604            documentData.fillColorAnim = true;
18605        }
18606        ind = 0;
18607        based = animatorData.s.b;
18608        for(i=0;i<len;i+=1){
18609            letterData = letters[i];
18610            letterData.anIndexes[j] = ind;
18611            if((based == 1 && letterData.val !== '') || (based == 2 && letterData.val !== '' && letterData.val !== '\u00A0') || (based == 3 && (letterData.n || letterData.val == '\u00A0' || i == len - 1)) || (based == 4 && (letterData.n || i == len - 1))){
18612                if(animatorData.s.rn === 1){
18613                    indexes.push(ind);
18614                }
18615                ind += 1;
18616            }
18617        }
18618        data.a[j].s.totalChars = ind;
18619        var currentInd = -1, newInd;
18620        if(animatorData.s.rn === 1){
18621            for(i = 0; i < len; i += 1){
18622                letterData = letters[i];
18623                if(currentInd != letterData.anIndexes[j]){
18624                    currentInd = letterData.anIndexes[j];
18625                    newInd = indexes.splice(Math.floor(Math.random()*indexes.length),1)[0];
18626                }
18627                letterData.anIndexes[j] = newInd;
18628            }
18629        }
18630    }
18631    documentData.yOffset = documentData.finalLineHeight || documentData.finalSize*1.2;
18632    documentData.ls = documentData.ls || 0;
18633    documentData.ascent = fontData.ascent*documentData.finalSize/100;
18634};
18635
18636TextProperty.prototype.updateDocumentData = function(newData, index) {
18637	index = index === undefined ? this.keysIndex : index;
18638    var dData = this.copyData({}, this.data.d.k[index].s);
18639    dData = this.copyData(dData, newData);
18640    this.data.d.k[index].s = dData;
18641    this.recalculate(index);
18642    this.elem.addDynamicProperty(this);
18643};
18644
18645TextProperty.prototype.recalculate = function(index) {
18646    var dData = this.data.d.k[index].s;
18647    dData.__complete = false;
18648    this.keysIndex = 0;
18649    this._isFirstFrame = true;
18650    this.getValue(dData);
18651}
18652
18653TextProperty.prototype.canResizeFont = function(_canResize) {
18654    this.canResize = _canResize;
18655    this.recalculate(this.keysIndex);
18656    this.elem.addDynamicProperty(this);
18657};
18658
18659TextProperty.prototype.setMinimumFontSize = function(_fontValue) {
18660    this.minimumFontSize = Math.floor(_fontValue) || 1;
18661    this.recalculate(this.keysIndex);
18662    this.elem.addDynamicProperty(this);
18663};
18664
18665var TextSelectorProp = (function(){
18666    var max = Math.max;
18667    var min = Math.min;
18668    var floor = Math.floor;
18669
18670    function TextSelectorProp(elem,data){
18671        this._currentTextLength = -1;
18672        this.k = false;
18673        this.data = data;
18674        this.elem = elem;
18675        this.comp = elem.comp;
18676        this.finalS = 0;
18677        this.finalE = 0;
18678        this.initDynamicPropertyContainer(elem);
18679        this.s = PropertyFactory.getProp(elem,data.s || {k:0},0,0,this);
18680        if('e' in data){
18681            this.e = PropertyFactory.getProp(elem,data.e,0,0,this);
18682        }else{
18683            this.e = {v:100};
18684        }
18685        this.o = PropertyFactory.getProp(elem,data.o || {k:0},0,0,this);
18686        this.xe = PropertyFactory.getProp(elem,data.xe || {k:0},0,0,this);
18687        this.ne = PropertyFactory.getProp(elem,data.ne || {k:0},0,0,this);
18688        this.a = PropertyFactory.getProp(elem,data.a,0,0.01,this);
18689        if(!this.dynamicProperties.length){
18690            this.getValue();
18691        }
18692    }
18693
18694    TextSelectorProp.prototype = {
18695        getMult: function(ind) {
18696            if(this._currentTextLength !== this.elem.textProperty.currentData.l.length) {
18697                this.getValue();
18698            }
18699            //var easer = bez.getEasingCurve(this.ne.v/100,0,1-this.xe.v/100,1);
18700            var easer = BezierFactory.getBezierEasing(this.ne.v/100,0,1-this.xe.v/100,1).get;
18701            var mult = 0;
18702            var s = this.finalS;
18703            var e = this.finalE;
18704            var type = this.data.sh;
18705            if(type == 2){
18706                if(e === s){
18707                    mult = ind >= e ? 1 : 0;
18708                }else{
18709                    mult = max(0,min(0.5/(e-s) + (ind-s)/(e-s),1));
18710                }
18711                mult = easer(mult);
18712            }else if(type == 3){
18713                if(e === s){
18714                    mult = ind >= e ? 0 : 1;
18715                }else{
18716                    mult = 1 - max(0,min(0.5/(e-s) + (ind-s)/(e-s),1));
18717                }
18718
18719                mult = easer(mult);
18720            }else if(type == 4){
18721                if(e === s){
18722                    mult = 0;
18723                }else{
18724                    mult = max(0,min(0.5/(e-s) + (ind-s)/(e-s),1));
18725                    if(mult<0.5){
18726                        mult *= 2;
18727                    }else{
18728                        mult = 1 - 2*(mult-0.5);
18729                    }
18730                }
18731                mult = easer(mult);
18732            }else if(type == 5){
18733                if(e === s){
18734                    mult = 0;
18735                }else{
18736                    var tot = e - s;
18737                    /*ind += 0.5;
18738                    mult = -4/(tot*tot)*(ind*ind)+(4/tot)*ind;*/
18739                    ind = min(max(0,ind+0.5-s),e-s);
18740                    var x = -tot/2+ind;
18741                    var a = tot/2;
18742                    mult = Math.sqrt(1 - (x*x)/(a*a));
18743                }
18744                mult = easer(mult);
18745            }else if(type == 6){
18746                if(e === s){
18747                    mult = 0;
18748                }else{
18749                    ind = min(max(0,ind+0.5-s),e-s);
18750                    mult = (1+(Math.cos((Math.PI+Math.PI*2*(ind)/(e-s)))))/2;
18751                    /*
18752                     ind = Math.min(Math.max(s,ind),e-1);
18753                     mult = (1+(Math.cos((Math.PI+Math.PI*2*(ind-s)/(e-1-s)))))/2;
18754                     mult = Math.max(mult,(1/(e-1-s))/(e-1-s));*/
18755                }
18756                mult = easer(mult);
18757            }else {
18758                if(ind >= floor(s)){
18759                    if(ind-s < 0){
18760                        mult = 1 - (s - ind);
18761                    }else{
18762                        mult = max(0,min(e-ind,1));
18763                    }
18764                }
18765                mult = easer(mult);
18766            }
18767            return mult*this.a.v;
18768        },
18769        getValue: function(newCharsFlag) {
18770            this.iterateDynamicProperties();
18771            this._mdf = newCharsFlag || this._mdf;
18772            this._currentTextLength = this.elem.textProperty.currentData.l.length || 0;
18773            if(newCharsFlag && this.data.r === 2) {
18774                this.e.v = this._currentTextLength;
18775            }
18776            var divisor = this.data.r === 2 ? 1 : 100 / this.data.totalChars;
18777            var o = this.o.v/divisor;
18778            var s = this.s.v/divisor + o;
18779            var e = (this.e.v/divisor) + o;
18780            if(s>e){
18781                var _s = s;
18782                s = e;
18783                e = _s;
18784            }
18785            this.finalS = s;
18786            this.finalE = e;
18787        }
18788    }
18789    extendPrototype([DynamicPropertyContainer], TextSelectorProp);
18790
18791    function getTextSelectorProp(elem, data,arr) {
18792        return new TextSelectorProp(elem, data, arr);
18793    }
18794
18795    return {
18796        getTextSelectorProp: getTextSelectorProp
18797    };
18798}());
18799
18800    
18801var pool_factory = (function() {
18802	return function(initialLength, _create, _release, _clone) {
18803
18804		var _length = 0;
18805		var _maxLength = initialLength;
18806		var pool = createSizedArray(_maxLength);
18807
18808		var ob = {
18809			newElement: newElement,
18810			release: release
18811		};
18812
18813		function newElement(){
18814			var element;
18815			if(_length){
18816				_length -= 1;
18817				element = pool[_length];
18818			} else {
18819				element = _create();
18820			}
18821			return element;
18822		}
18823
18824		function release(element) {
18825			if(_length === _maxLength) {
18826				pool = pooling.double(pool);
18827				_maxLength = _maxLength*2;
18828			}
18829			if (_release) {
18830				_release(element);
18831			}
18832			pool[_length] = element;
18833			_length += 1;
18834		}
18835
18836		function clone() {
18837			var clonedElement = newElement();
18838			return _clone(clonedElement);
18839		}
18840
18841		return ob;
18842	};
18843}());
18844
18845var pooling = (function(){
18846
18847	function double(arr){
18848		return arr.concat(createSizedArray(arr.length));
18849	}
18850
18851	return {
18852		double: double
18853	};
18854}());
18855var point_pool = (function(){
18856
18857	function create() {
18858		return createTypedArray('float32', 2);
18859	}
18860	return pool_factory(8, create);
18861}());
18862var shape_pool = (function(){
18863
18864	function create() {
18865		return new ShapePath();
18866	}
18867
18868	function release(shapePath) {
18869		var len = shapePath._length, i;
18870		for(i = 0; i < len; i += 1) {
18871			point_pool.release(shapePath.v[i]);
18872			point_pool.release(shapePath.i[i]);
18873			point_pool.release(shapePath.o[i]);
18874			shapePath.v[i] = null;
18875			shapePath.i[i] = null;
18876			shapePath.o[i] = null;
18877		}
18878		shapePath._length = 0;
18879		shapePath.c = false;
18880	}
18881
18882	function clone(shape) {
18883		var cloned = factory.newElement();
18884		var i, len = shape._length === undefined ? shape.v.length : shape._length;
18885		cloned.setLength(len);
18886		cloned.c = shape.c;
18887		var pt;
18888		
18889		for(i = 0; i < len; i += 1) {
18890			cloned.setTripleAt(shape.v[i][0],shape.v[i][1],shape.o[i][0],shape.o[i][1],shape.i[i][0],shape.i[i][1], i);
18891		}
18892		return cloned;
18893	}
18894
18895	var factory = pool_factory(4, create, release);
18896	factory.clone = clone;
18897
18898	return factory;
18899}());
18900var shapeCollection_pool = (function(){
18901	var ob = {
18902		newShapeCollection: newShapeCollection,
18903		release: release
18904	};
18905
18906	var _length = 0;
18907	var _maxLength = 4;
18908	var pool = createSizedArray(_maxLength);
18909
18910	function newShapeCollection(){
18911		var shapeCollection;
18912		if(_length){
18913			_length -= 1;
18914			shapeCollection = pool[_length];
18915		} else {
18916			shapeCollection = new ShapeCollection();
18917		}
18918		return shapeCollection;
18919	}
18920
18921	function release(shapeCollection) {
18922		var i, len = shapeCollection._length;
18923		for(i = 0; i < len; i += 1) {
18924			shape_pool.release(shapeCollection.shapes[i]);
18925		}
18926		shapeCollection._length = 0;
18927
18928		if(_length === _maxLength) {
18929			pool = pooling.double(pool);
18930			_maxLength = _maxLength*2;
18931		}
18932		pool[_length] = shapeCollection;
18933		_length += 1;
18934	}
18935
18936	return ob;
18937}());
18938var segments_length_pool = (function(){
18939
18940	function create() {
18941		return {
18942			lengths: [],
18943			totalLength: 0
18944		};
18945	}
18946
18947	function release(element) {
18948		var i, len = element.lengths.length;
18949		for(i=0;i<len;i+=1) {
18950			bezier_length_pool.release(element.lengths[i]);
18951		}
18952		element.lengths.length = 0;
18953	}
18954
18955	return pool_factory(8, create, release);
18956}());
18957var bezier_length_pool = (function(){
18958
18959	function create() {
18960		return {
18961            addedLength: 0,
18962            percents: createTypedArray('float32', defaultCurveSegments),
18963            lengths: createTypedArray('float32', defaultCurveSegments),
18964        };
18965	}
18966	return pool_factory(8, create);
18967}());
18968function BaseRenderer(){}
18969BaseRenderer.prototype.checkLayers = function(num){
18970    var i, len = this.layers.length, data;
18971    this.completeLayers = true;
18972    for (i = len - 1; i >= 0; i--) {
18973        if (!this.elements[i]) {
18974            data = this.layers[i];
18975            if(data.ip - data.st <= (num - this.layers[i].st) && data.op - data.st > (num - this.layers[i].st))
18976            {
18977                this.buildItem(i);
18978            }
18979        }
18980        this.completeLayers = this.elements[i] ? this.completeLayers:false;
18981    }
18982    this.checkPendingElements();
18983};
18984
18985BaseRenderer.prototype.createItem = function(layer){
18986    switch(layer.ty){
18987        case 2:
18988            return this.createImage(layer);
18989        case 0:
18990            return this.createComp(layer);
18991        case 1:
18992            return this.createSolid(layer);
18993        case 3:
18994            return this.createNull(layer);
18995        case 4:
18996            return this.createShape(layer);
18997        case 5:
18998            return this.createText(layer);
18999        case 13:
19000            return this.createCamera(layer);
19001    }
19002    return this.createNull(layer);
19003};
19004
19005BaseRenderer.prototype.createCamera = function(){
19006    throw new Error('You\'re using a 3d camera. Try the html renderer.');
19007};
19008
19009BaseRenderer.prototype.buildAllItems = function(){
19010    var i, len = this.layers.length;
19011    for(i=0;i<len;i+=1){
19012        this.buildItem(i);
19013    }
19014    this.checkPendingElements();
19015};
19016
19017BaseRenderer.prototype.includeLayers = function(newLayers){
19018    this.completeLayers = false;
19019    var i, len = newLayers.length;
19020    var j, jLen = this.layers.length;
19021    for(i=0;i<len;i+=1){
19022        j = 0;
19023        while(j<jLen){
19024            if(this.layers[j].id == newLayers[i].id){
19025                this.layers[j] = newLayers[i];
19026                break;
19027            }
19028            j += 1;
19029        }
19030    }
19031};
19032
19033BaseRenderer.prototype.setProjectInterface = function(pInterface){
19034    this.globalData.projectInterface = pInterface;
19035};
19036
19037BaseRenderer.prototype.initItems = function(){
19038    if(!this.globalData.progressiveLoad){
19039        this.buildAllItems();
19040    }
19041};
19042BaseRenderer.prototype.buildElementParenting = function(element, parentName, hierarchy) {
19043    var elements = this.elements;
19044    var layers = this.layers;
19045    var i=0, len = layers.length;
19046    while (i < len) {
19047        if (layers[i].ind == parentName) {
19048            if (!elements[i] || elements[i] === true) {
19049                this.buildItem(i);
19050                this.addPendingElement(element);
19051            } else {
19052                hierarchy.push(elements[i]);
19053                elements[i].setAsParent();
19054                if(layers[i].parent !== undefined) {
19055                    this.buildElementParenting(element, layers[i].parent, hierarchy);
19056                } else {
19057                    element.setHierarchy(hierarchy);
19058                }
19059            }
19060        }
19061        i += 1;
19062    }
19063};
19064
19065BaseRenderer.prototype.addPendingElement = function(element){
19066    this.pendingElements.push(element);
19067};
19068
19069BaseRenderer.prototype.searchExtraCompositions = function(assets){
19070    var i, len = assets.length;
19071    for(i=0;i<len;i+=1){
19072        if(assets[i].xt){
19073            var comp = this.createComp(assets[i]);
19074            comp.initExpressions();
19075            this.globalData.projectInterface.registerComposition(comp);
19076        }
19077    }
19078};
19079
19080BaseRenderer.prototype.setupGlobalData = function(animData, fontsContainer) {
19081    this.globalData.fontManager = new FontManager();
19082    this.globalData.fontManager.addChars(animData.chars);
19083    this.globalData.fontManager.addFonts(animData.fonts, fontsContainer);
19084    this.globalData.getAssetData = this.animationItem.getAssetData.bind(this.animationItem);
19085    this.globalData.getAssetsPath = this.animationItem.getAssetsPath.bind(this.animationItem);
19086    this.globalData.imageLoader = this.animationItem.imagePreloader;
19087    this.globalData.frameId = 0;
19088    this.globalData.frameRate = animData.fr;
19089    this.globalData.nm = animData.nm;
19090    this.globalData.compSize = {
19091        w: animData.w,
19092        h: animData.h
19093    }
19094}
19095function SVGRenderer(animationItem, config){
19096    this.animationItem = animationItem;
19097    this.layers = null;
19098    this.renderedFrame = -1;
19099    this.svgElement = createNS('svg');
19100    var ariaLabel = '';
19101    if (config && config.title) {
19102        var titleElement = createNS('title');
19103        var titleId = createElementID();
19104        titleElement.setAttribute('id', titleId);
19105        titleElement.textContent = config.title;
19106        this.svgElement.appendChild(titleElement);
19107        ariaLabel += titleId;
19108    }
19109    if (config && config.description) {
19110        var descElement = createNS('desc');
19111        var descId = createElementID();
19112        descElement.setAttribute('id', descId);
19113        descElement.textContent = config.description;
19114        this.svgElement.appendChild(descElement);
19115        ariaLabel += ' ' + descId;
19116    }
19117    if (ariaLabel) {
19118        this.svgElement.setAttribute('aria-labelledby', ariaLabel)
19119    }
19120    var defs = createNS( 'defs');
19121    this.svgElement.appendChild(defs);
19122    var maskElement = createNS('g');
19123    this.svgElement.appendChild(maskElement);
19124    this.layerElement = maskElement;
19125    this.renderConfig = {
19126        preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
19127        imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
19128        progressiveLoad: (config && config.progressiveLoad) || false,
19129        hideOnTransparent: (config && config.hideOnTransparent === false) ? false : true,
19130        viewBoxOnly: (config && config.viewBoxOnly) || false,
19131        viewBoxSize: (config && config.viewBoxSize) || false,
19132        className: (config && config.className) || '',
19133        focusable: config && config.focusable
19134    };
19135
19136    this.globalData = {
19137        _mdf: false,
19138        frameNum: -1,
19139        defs: defs,
19140        renderConfig: this.renderConfig
19141    };
19142    this.elements = [];
19143    this.pendingElements = [];
19144    this.destroyed = false;
19145    this.rendererType = 'svg';
19146
19147}
19148
19149extendPrototype([BaseRenderer],SVGRenderer);
19150
19151SVGRenderer.prototype.createNull = function (data) {
19152    return new NullElement(data,this.globalData,this);
19153};
19154
19155SVGRenderer.prototype.createShape = function (data) {
19156    return new SVGShapeElement(data,this.globalData,this);
19157};
19158
19159SVGRenderer.prototype.createText = function (data) {
19160    return new SVGTextElement(data,this.globalData,this);
19161
19162};
19163
19164SVGRenderer.prototype.createImage = function (data) {
19165    return new IImageElement(data,this.globalData,this);
19166};
19167
19168SVGRenderer.prototype.createComp = function (data) {
19169    return new SVGCompElement(data,this.globalData,this);
19170
19171};
19172
19173SVGRenderer.prototype.createSolid = function (data) {
19174    return new ISolidElement(data,this.globalData,this);
19175};
19176
19177SVGRenderer.prototype.configAnimation = function(animData){
19178    this.svgElement.setAttribute('xmlns','http://www.w3.org/2000/svg');
19179    if(this.renderConfig.viewBoxSize) {
19180        this.svgElement.setAttribute('viewBox',this.renderConfig.viewBoxSize);
19181    } else {
19182        this.svgElement.setAttribute('viewBox','0 0 '+animData.w+' '+animData.h);
19183    }
19184
19185    if(!this.renderConfig.viewBoxOnly) {
19186        this.svgElement.setAttribute('width',animData.w);
19187        this.svgElement.setAttribute('height',animData.h);
19188        this.svgElement.style.width = '100%';
19189        this.svgElement.style.height = '100%';
19190        this.svgElement.style.transform = 'translate3d(0,0,0)';
19191    }
19192    if(this.renderConfig.className) {
19193        this.svgElement.setAttribute('class', this.renderConfig.className);
19194    }
19195    if(this.renderConfig.focusable !== undefined) {
19196        this.svgElement.setAttribute('focusable', this.renderConfig.focusable);
19197    }
19198    this.svgElement.setAttribute('preserveAspectRatio',this.renderConfig.preserveAspectRatio);
19199    //this.layerElement.style.transform = 'translate3d(0,0,0)';
19200    //this.layerElement.style.transformOrigin = this.layerElement.style.mozTransformOrigin = this.layerElement.style.webkitTransformOrigin = this.layerElement.style['-webkit-transform'] = "0px 0px 0px";
19201    this.animationItem.wrapper.appendChild(this.svgElement);
19202    //Mask animation
19203    var defs = this.globalData.defs;
19204
19205    this.setupGlobalData(animData, defs);
19206    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
19207    this.data = animData;
19208
19209    var maskElement = createNS( 'clipPath');
19210    var rect = createNS('rect');
19211    rect.setAttribute('width',animData.w);
19212    rect.setAttribute('height',animData.h);
19213    rect.setAttribute('x',0);
19214    rect.setAttribute('y',0);
19215    var maskId = createElementID();
19216    maskElement.setAttribute('id', maskId);
19217    maskElement.appendChild(rect);
19218    this.layerElement.setAttribute("clip-path", "url(" + locationHref + "#"+maskId+")");
19219
19220    defs.appendChild(maskElement);
19221    this.layers = animData.layers;
19222    this.elements = createSizedArray(animData.layers.length);
19223};
19224
19225
19226SVGRenderer.prototype.destroy = function () {
19227    this.animationItem.wrapper.innerHTML = '';
19228    this.layerElement = null;
19229    this.globalData.defs = null;
19230    var i, len = this.layers ? this.layers.length : 0;
19231    for (i = 0; i < len; i++) {
19232        if(this.elements[i]){
19233            this.elements[i].destroy();
19234        }
19235    }
19236    this.elements.length = 0;
19237    this.destroyed = true;
19238    this.animationItem = null;
19239};
19240
19241SVGRenderer.prototype.updateContainerSize = function () {
19242};
19243
19244SVGRenderer.prototype.buildItem  = function(pos){
19245    var elements = this.elements;
19246    if(elements[pos] || this.layers[pos].ty == 99){
19247        return;
19248    }
19249    elements[pos] = true;
19250    var element = this.createItem(this.layers[pos]);
19251
19252    elements[pos] = element;
19253    if(expressionsPlugin){
19254        if(this.layers[pos].ty === 0){
19255            this.globalData.projectInterface.registerComposition(element);
19256        }
19257        element.initExpressions();
19258    }
19259    this.appendElementInPos(element,pos);
19260    if(this.layers[pos].tt){
19261        if(!this.elements[pos - 1] || this.elements[pos - 1] === true){
19262            this.buildItem(pos - 1);
19263            this.addPendingElement(element);
19264        } else {
19265            element.setMatte(elements[pos - 1].layerId);
19266        }
19267    }
19268};
19269
19270SVGRenderer.prototype.checkPendingElements  = function(){
19271    while(this.pendingElements.length){
19272        var element = this.pendingElements.pop();
19273        element.checkParenting();
19274        if(element.data.tt){
19275            var i = 0, len = this.elements.length;
19276            while(i<len){
19277                if(this.elements[i] === element){
19278                    element.setMatte(this.elements[i - 1].layerId);
19279                    break;
19280                }
19281                i += 1;
19282            }
19283        }
19284    }
19285};
19286
19287SVGRenderer.prototype.renderFrame = function(num){
19288    if(this.renderedFrame === num || this.destroyed){
19289        return;
19290    }
19291    if(num === null){
19292        num = this.renderedFrame;
19293    }else{
19294        this.renderedFrame = num;
19295    }
19296    // console.log('-------');
19297    // console.log('FRAME ',num);
19298    this.globalData.frameNum = num;
19299    this.globalData.frameId += 1;
19300    this.globalData.projectInterface.currentFrame = num;
19301    this.globalData._mdf = false;
19302    var i, len = this.layers.length;
19303    if(!this.completeLayers){
19304        this.checkLayers(num);
19305    }
19306    for (i = len - 1; i >= 0; i--) {
19307        if(this.completeLayers || this.elements[i]){
19308            this.elements[i].prepareFrame(num - this.layers[i].st);
19309        }
19310    }
19311    if(this.globalData._mdf) {
19312        for (i = 0; i < len; i += 1) {
19313            if(this.completeLayers || this.elements[i]){
19314                this.elements[i].renderFrame();
19315            }
19316        }
19317    }
19318};
19319
19320SVGRenderer.prototype.appendElementInPos = function(element, pos){
19321    var newElement = element.getBaseElement();
19322    if(!newElement){
19323        return;
19324    }
19325    var i = 0;
19326    var nextElement;
19327    while(i<pos){
19328        if(this.elements[i] && this.elements[i]!== true && this.elements[i].getBaseElement()){
19329            nextElement = this.elements[i].getBaseElement();
19330        }
19331        i += 1;
19332    }
19333    if(nextElement){
19334        this.layerElement.insertBefore(newElement, nextElement);
19335    } else {
19336        this.layerElement.appendChild(newElement);
19337    }
19338};
19339
19340SVGRenderer.prototype.hide = function(){
19341    this.layerElement.style.display = 'none';
19342};
19343
19344SVGRenderer.prototype.show = function(){
19345    this.layerElement.style.display = 'block';
19346};
19347
19348function CanvasRenderer(animationItem, config){
19349    this.animationItem = animationItem;
19350    this.renderConfig = {
19351        clearCanvas: (config && config.clearCanvas !== undefined) ? config.clearCanvas : true,
19352        context: (config && config.context) || null,
19353        progressiveLoad: (config && config.progressiveLoad) || false,
19354        preserveAspectRatio: (config && config.preserveAspectRatio) || 'xMidYMid meet',
19355        imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
19356        className: (config && config.className) || ''
19357    };
19358    this.renderConfig.dpr = (config && config.dpr) || 1;
19359    if (this.animationItem.wrapper) {
19360        this.renderConfig.dpr = (config && config.dpr) || window.devicePixelRatio || 1;
19361    }
19362    this.renderedFrame = -1;
19363    this.globalData = {
19364        frameNum: -1,
19365        _mdf: false,
19366        renderConfig: this.renderConfig,
19367        currentGlobalAlpha: -1
19368    };
19369    this.contextData = new CVContextData();
19370    this.elements = [];
19371    this.pendingElements = [];
19372    this.transformMat = new Matrix();
19373    this.completeLayers = false;
19374    this.rendererType = 'canvas';
19375}
19376extendPrototype([BaseRenderer],CanvasRenderer);
19377
19378CanvasRenderer.prototype.createShape = function (data) {
19379    return new CVShapeElement(data, this.globalData, this);
19380};
19381
19382CanvasRenderer.prototype.createText = function (data) {
19383    return new CVTextElement(data, this.globalData, this);
19384};
19385
19386CanvasRenderer.prototype.createImage = function (data) {
19387    return new CVImageElement(data, this.globalData, this);
19388};
19389
19390CanvasRenderer.prototype.createComp = function (data) {
19391    return new CVCompElement(data, this.globalData, this);
19392};
19393
19394CanvasRenderer.prototype.createSolid = function (data) {
19395    return new CVSolidElement(data, this.globalData, this);
19396};
19397
19398CanvasRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
19399
19400CanvasRenderer.prototype.ctxTransform = function(props){
19401    if(props[0] === 1 && props[1] === 0 && props[4] === 0 && props[5] === 1 && props[12] === 0 && props[13] === 0){
19402        return;
19403    }
19404    if(!this.renderConfig.clearCanvas){
19405        this.canvasContext.transform(props[0],props[1],props[4],props[5],props[12],props[13]);
19406        return;
19407    }
19408    this.transformMat.cloneFromProps(props);
19409    var cProps = this.contextData.cTr.props;
19410    this.transformMat.transform(cProps[0],cProps[1],cProps[2],cProps[3],cProps[4],cProps[5],cProps[6],cProps[7],cProps[8],cProps[9],cProps[10],cProps[11],cProps[12],cProps[13],cProps[14],cProps[15]);
19411    //this.contextData.cTr.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
19412    this.contextData.cTr.cloneFromProps(this.transformMat.props);
19413    var trProps = this.contextData.cTr.props;
19414    this.canvasContext.setTransform(trProps[0],trProps[1],trProps[4],trProps[5],trProps[12],trProps[13]);
19415};
19416
19417CanvasRenderer.prototype.ctxOpacity = function(op){
19418    /*if(op === 1){
19419        return;
19420    }*/
19421    if(!this.renderConfig.clearCanvas){
19422        this.canvasContext.globalAlpha *= op < 0 ? 0 : op;
19423        this.globalData.currentGlobalAlpha = this.contextData.cO;
19424        return;
19425    }
19426    this.contextData.cO *= op < 0 ? 0 : op;
19427    if(this.globalData.currentGlobalAlpha !== this.contextData.cO) {
19428        this.canvasContext.globalAlpha = this.contextData.cO;
19429        this.globalData.currentGlobalAlpha = this.contextData.cO;
19430    }
19431};
19432
19433CanvasRenderer.prototype.reset = function(){
19434    if(!this.renderConfig.clearCanvas){
19435        this.canvasContext.restore();
19436        return;
19437    }
19438    this.contextData.reset();
19439};
19440
19441CanvasRenderer.prototype.save = function(actionFlag){
19442    if(!this.renderConfig.clearCanvas){
19443        this.canvasContext.save();
19444        return;
19445    }
19446    if(actionFlag){
19447        this.canvasContext.save();
19448    }
19449    var props = this.contextData.cTr.props;
19450    if(this.contextData._length <= this.contextData.cArrPos) {
19451        this.contextData.duplicate();
19452    }
19453    var i, arr = this.contextData.saved[this.contextData.cArrPos];
19454    for (i = 0; i < 16; i += 1) {
19455        arr[i] = props[i];
19456    }
19457    this.contextData.savedOp[this.contextData.cArrPos] = this.contextData.cO;
19458    this.contextData.cArrPos += 1;
19459};
19460
19461CanvasRenderer.prototype.restore = function(actionFlag){
19462    if(!this.renderConfig.clearCanvas){
19463        this.canvasContext.restore();
19464        return;
19465    }
19466    if(actionFlag){
19467        this.canvasContext.restore();
19468        this.globalData.blendMode = 'source-over';
19469    }
19470    this.contextData.cArrPos -= 1;
19471    var popped = this.contextData.saved[this.contextData.cArrPos];
19472    var i,arr = this.contextData.cTr.props;
19473    for(i=0;i<16;i+=1){
19474        arr[i] = popped[i];
19475    }
19476    this.canvasContext.setTransform(popped[0],popped[1],popped[4],popped[5],popped[12],popped[13]);
19477    popped = this.contextData.savedOp[this.contextData.cArrPos];
19478    this.contextData.cO = popped;
19479    if(this.globalData.currentGlobalAlpha !== popped) {
19480        this.canvasContext.globalAlpha = popped;
19481        this.globalData.currentGlobalAlpha = popped;
19482    }
19483};
19484
19485CanvasRenderer.prototype.configAnimation = function(animData){
19486    if(this.animationItem.wrapper){
19487        this.animationItem.container = createTag('canvas');
19488        this.animationItem.container.style.width = '100%';
19489        this.animationItem.container.style.height = '100%';
19490        //this.animationItem.container.style.transform = 'translate3d(0,0,0)';
19491        //this.animationItem.container.style.webkitTransform = 'translate3d(0,0,0)';
19492        this.animationItem.container.style.transformOrigin = this.animationItem.container.style.mozTransformOrigin = this.animationItem.container.style.webkitTransformOrigin = this.animationItem.container.style['-webkit-transform'] = "0px 0px 0px";
19493        this.animationItem.wrapper.appendChild(this.animationItem.container);
19494        this.canvasContext = this.animationItem.container.getContext('2d');
19495        if(this.renderConfig.className) {
19496            this.animationItem.container.setAttribute('class', this.renderConfig.className);
19497        }
19498    }else{
19499        this.canvasContext = this.renderConfig.context;
19500    }
19501    this.data = animData;
19502    this.layers = animData.layers;
19503    this.transformCanvas = {
19504        w: animData.w,
19505        h:animData.h,
19506        sx:0,
19507        sy:0,
19508        tx:0,
19509        ty:0
19510    };
19511    this.setupGlobalData(animData, document.body);
19512    this.globalData.canvasContext = this.canvasContext;
19513    this.globalData.renderer = this;
19514    this.globalData.isDashed = false;
19515    this.globalData.progressiveLoad = this.renderConfig.progressiveLoad;
19516    this.globalData.transformCanvas = this.transformCanvas;
19517    this.elements = createSizedArray(animData.layers.length);
19518
19519    this.updateContainerSize();
19520};
19521
19522CanvasRenderer.prototype.updateContainerSize = function () {
19523    this.reset();
19524    var elementWidth,elementHeight;
19525    if(this.animationItem.wrapper && this.animationItem.container){
19526        elementWidth = this.animationItem.wrapper.offsetWidth;
19527        elementHeight = this.animationItem.wrapper.offsetHeight;
19528        this.animationItem.container.setAttribute('width',elementWidth * this.renderConfig.dpr );
19529        this.animationItem.container.setAttribute('height',elementHeight * this.renderConfig.dpr);
19530    }else{
19531        elementWidth = this.canvasContext.canvas.width * this.renderConfig.dpr;
19532        elementHeight = this.canvasContext.canvas.height * this.renderConfig.dpr;
19533    }
19534    var elementRel,animationRel;
19535    if(this.renderConfig.preserveAspectRatio.indexOf('meet') !== -1 || this.renderConfig.preserveAspectRatio.indexOf('slice') !== -1){
19536        var par = this.renderConfig.preserveAspectRatio.split(' ');
19537        var fillType = par[1] || 'meet';
19538        var pos = par[0] || 'xMidYMid';
19539        var xPos = pos.substr(0,4);
19540        var yPos = pos.substr(4);
19541        elementRel = elementWidth/elementHeight;
19542        animationRel = this.transformCanvas.w/this.transformCanvas.h;
19543        if(animationRel>elementRel && fillType === 'meet' || animationRel<elementRel && fillType === 'slice'){
19544            this.transformCanvas.sx = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
19545            this.transformCanvas.sy = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
19546        }else{
19547            this.transformCanvas.sx = elementHeight/(this.transformCanvas.h / this.renderConfig.dpr);
19548            this.transformCanvas.sy = elementHeight/(this.transformCanvas.h / this.renderConfig.dpr);
19549        }
19550
19551        if(xPos === 'xMid' && ((animationRel<elementRel && fillType==='meet') || (animationRel>elementRel && fillType === 'slice'))){
19552            this.transformCanvas.tx = (elementWidth-this.transformCanvas.w*(elementHeight/this.transformCanvas.h))/2*this.renderConfig.dpr;
19553        } else if(xPos === 'xMax' && ((animationRel<elementRel && fillType==='meet') || (animationRel>elementRel && fillType === 'slice'))){
19554            this.transformCanvas.tx = (elementWidth-this.transformCanvas.w*(elementHeight/this.transformCanvas.h))*this.renderConfig.dpr;
19555        } else {
19556            this.transformCanvas.tx = 0;
19557        }
19558        if(yPos === 'YMid' && ((animationRel>elementRel && fillType==='meet') || (animationRel<elementRel && fillType === 'slice'))){
vendor: 5,769 bytes, lines 19559-19718
19559            this.transformCanvas.ty = ((elementHeight-this.transformCanvas.h*(elementWidth/this.transformCanvas.w))/2)*this.renderConfig.dpr;
19560        } else if(yPos === 'YMax' && ((animationRel>elementRel && fillType==='meet') || (animationRel<elementRel && fillType === 'slice'))){
19561            this.transformCanvas.ty = ((elementHeight-this.transformCanvas.h*(elementWidth/this.transformCanvas.w)))*this.renderConfig.dpr;
19562        } else {
19563            this.transformCanvas.ty = 0;
19564        }
19565
19566    }else if(this.renderConfig.preserveAspectRatio == 'none'){
19567        this.transformCanvas.sx = elementWidth/(this.transformCanvas.w/this.renderConfig.dpr);
19568        this.transformCanvas.sy = elementHeight/(this.transformCanvas.h/this.renderConfig.dpr);
19569        this.transformCanvas.tx = 0;
19570        this.transformCanvas.ty = 0;
19571    }else{
19572        this.transformCanvas.sx = this.renderConfig.dpr;
19573        this.transformCanvas.sy = this.renderConfig.dpr;
19574        this.transformCanvas.tx = 0;
19575        this.transformCanvas.ty = 0;
19576    }
19577    this.transformCanvas.props = [this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1];
19578    /*var i, len = this.elements.length;
19579    for(i=0;i<len;i+=1){
19580        if(this.elements[i] && this.elements[i].data.ty === 0){
19581            this.elements[i].resize(this.globalData.transformCanvas);
19582        }
19583    }*/
19584    this.ctxTransform(this.transformCanvas.props);
19585    this.canvasContext.beginPath();
19586    this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h);
19587    this.canvasContext.closePath();
19588    this.canvasContext.clip();
19589
19590    this.renderFrame(this.renderedFrame, true);
19591};
19592
19593CanvasRenderer.prototype.destroy = function () {
19594    if(this.renderConfig.clearCanvas) {
19595        this.animationItem.wrapper.innerHTML = '';
19596    }
19597    var i, len = this.layers ? this.layers.length : 0;
19598    for (i = len - 1; i >= 0; i-=1) {
19599        if(this.elements[i]) {
19600            this.elements[i].destroy();
19601        }
19602    }
19603    this.elements.length = 0;
19604    this.globalData.canvasContext = null;
19605    this.animationItem.container = null;
19606    this.destroyed = true;
19607};
19608
19609CanvasRenderer.prototype.renderFrame = function(num, forceRender){
19610    if((this.renderedFrame === num && this.renderConfig.clearCanvas === true && !forceRender) || this.destroyed || num === -1){
19611        return;
19612    }
19613    this.renderedFrame = num;
19614    this.globalData.frameNum = num - this.animationItem._isFirstFrame;
19615    this.globalData.frameId += 1;
19616    this.globalData._mdf = !this.renderConfig.clearCanvas || forceRender;
19617    this.globalData.projectInterface.currentFrame = num;
19618
19619     // console.log('--------');
19620     // console.log('NEW: ',num);
19621    var i, len = this.layers.length;
19622    if(!this.completeLayers){
19623        this.checkLayers(num);
19624    }
19625
19626    for (i = 0; i < len; i++) {
19627        if(this.completeLayers || this.elements[i]){
19628            this.elements[i].prepareFrame(num - this.layers[i].st);
19629        }
19630    }
19631    if(this.globalData._mdf) {
19632        if(this.renderConfig.clearCanvas === true){
19633            this.canvasContext.clearRect(0, 0, this.transformCanvas.w, this.transformCanvas.h);
19634        }else{
19635            this.save();
19636        }
19637        for (i = len - 1; i >= 0; i-=1) {
19638            if(this.completeLayers || this.elements[i]){
19639                this.elements[i].renderFrame();
19640            }
19641        }
19642        if(this.renderConfig.clearCanvas !== true){
19643            this.restore();
19644        }
19645    }
19646};
19647
19648CanvasRenderer.prototype.buildItem = function(pos){
19649    var elements = this.elements;
19650    if(elements[pos] || this.layers[pos].ty == 99){
19651        return;
19652    }
19653    var element = this.createItem(this.layers[pos], this,this.globalData);
19654    elements[pos] = element;
19655    element.initExpressions();
19656    /*if(this.layers[pos].ty === 0){
19657        element.resize(this.globalData.transformCanvas);
19658    }*/
19659};
19660
19661CanvasRenderer.prototype.checkPendingElements  = function(){
19662    while(this.pendingElements.length){
19663        var element = this.pendingElements.pop();
19664        element.checkParenting();
19665    }
19666};
19667
19668CanvasRenderer.prototype.hide = function(){
19669    this.animationItem.container.style.display = 'none';
19670};
19671
19672CanvasRenderer.prototype.show = function(){
19673    this.animationItem.container.style.display = 'block';
19674};
19675
19676function HybridRenderer(animationItem, config){
19677    this.animationItem = animationItem;
19678    this.layers = null;
19679    this.renderedFrame = -1;
19680    this.renderConfig = {
19681        className: (config && config.className) || '',
19682        imagePreserveAspectRatio: (config && config.imagePreserveAspectRatio) || 'xMidYMid slice',
19683        hideOnTransparent: (config && config.hideOnTransparent === false) ? false : true
19684    };
19685    this.globalData = {
19686        _mdf: false,
19687        frameNum: -1,
19688        renderConfig: this.renderConfig
19689    };
19690    this.pendingElements = [];
19691    this.elements = [];
19692    this.threeDElements = [];
19693    this.destroyed = false;
19694    this.camera = null;
19695    this.supports3d = true;
19696    this.rendererType = 'html';
19697
19698}
19699
19700extendPrototype([BaseRenderer],HybridRenderer);
19701
19702HybridRenderer.prototype.buildItem = SVGRenderer.prototype.buildItem;
19703
19704HybridRenderer.prototype.checkPendingElements  = function(){
19705    while(this.pendingElements.length){
19706        var element = this.pendingElements.pop();
19707        element.checkParenting();
19708    }
19709};
19710
19711HybridRenderer.prototype.appendElementInPos = function(element, pos){
19712    var newDOMElement = element.getBaseElement();
19713    if(!newDOMElement){
19714        return;
19715    }
19716    var layer = this.layers[pos];
19717    if(!layer.ddd || !this.supports3d){
19718        if(this.threeDElements) {
vendor: 8,448 bytes, lines 19719-19948
19719            this.addTo3dContainer(newDOMElement,pos);
19720        } else {
19721            var i = 0;
19722            var nextDOMElement, nextLayer, tmpDOMElement;
19723            while(i<pos){
19724                if(this.elements[i] && this.elements[i]!== true && this.elements[i].getBaseElement){
19725                    nextLayer = this.elements[i];
19726                    tmpDOMElement = this.layers[i].ddd ? this.getThreeDContainerByPos(i) : nextLayer.getBaseElement();
19727                    nextDOMElement = tmpDOMElement || nextDOMElement;
19728                }
19729                i += 1;
19730            }
19731            if(nextDOMElement){
19732                if(!layer.ddd || !this.supports3d){
19733                    this.layerElement.insertBefore(newDOMElement, nextDOMElement);
19734                }
19735            } else {
19736                if(!layer.ddd || !this.supports3d){
19737                    this.layerElement.appendChild(newDOMElement);
19738                }
19739            }
19740        }
19741        
19742    } else {
19743        this.addTo3dContainer(newDOMElement,pos);
19744    }
19745};
19746
19747HybridRenderer.prototype.createShape = function (data) {
19748    if(!this.supports3d){
19749        return new SVGShapeElement(data, this.globalData, this);
19750    }
19751    return new HShapeElement(data, this.globalData, this);
19752};
19753
19754HybridRenderer.prototype.createText = function (data) {
19755    if(!this.supports3d){
19756        return new SVGTextElement(data, this.globalData, this);
19757    }
19758    return new HTextElement(data, this.globalData, this);
19759};
19760
19761HybridRenderer.prototype.createCamera = function (data) {
19762    this.camera = new HCameraElement(data, this.globalData, this);
19763    return this.camera;
19764};
19765
19766HybridRenderer.prototype.createImage = function (data) {
19767    if(!this.supports3d){
19768        return new IImageElement(data, this.globalData, this);
19769    }
19770    return new HImageElement(data, this.globalData, this);
19771};
19772
19773HybridRenderer.prototype.createComp = function (data) {
19774    if(!this.supports3d){
19775        return new SVGCompElement(data, this.globalData, this);
19776    }
19777    return new HCompElement(data, this.globalData, this);
19778
19779};
19780
19781HybridRenderer.prototype.createSolid = function (data) {
19782    if(!this.supports3d){
19783        return new ISolidElement(data, this.globalData, this);
19784    }
19785    return new HSolidElement(data, this.globalData, this);
19786};
19787
19788HybridRenderer.prototype.createNull = SVGRenderer.prototype.createNull;
19789
19790HybridRenderer.prototype.getThreeDContainerByPos = function(pos){
19791    var i = 0, len = this.threeDElements.length;
19792    while(i<len) {
19793        if(this.threeDElements[i].startPos <= pos && this.threeDElements[i].endPos >= pos) {
19794            return this.threeDElements[i].perspectiveElem;
19795        }
19796        i += 1;
19797    }
19798};
19799
19800HybridRenderer.prototype.createThreeDContainer = function(pos, type){
19801    var perspectiveElem = createTag('div');
19802    styleDiv(perspectiveElem);
19803    var container = createTag('div');
19804    styleDiv(container);
19805    if(type === '3d') {
19806        perspectiveElem.style.width = this.globalData.compSize.w+'px';
19807        perspectiveElem.style.height = this.globalData.compSize.h+'px';
19808        perspectiveElem.style.transformOrigin = perspectiveElem.style.mozTransformOrigin = perspectiveElem.style.webkitTransformOrigin = "50% 50%";
19809        container.style.transform = container.style.webkitTransform = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
19810    }
19811    
19812    perspectiveElem.appendChild(container);
19813    //this.resizerElem.appendChild(perspectiveElem);
19814    var threeDContainerData = {
19815        container:container,
19816        perspectiveElem:perspectiveElem,
19817        startPos: pos,
19818        endPos: pos,
19819        type: type
19820    };
19821    this.threeDElements.push(threeDContainerData);
19822    return threeDContainerData;
19823};
19824
19825HybridRenderer.prototype.build3dContainers = function(){
19826    var i, len = this.layers.length;
19827    var lastThreeDContainerData;
19828    var currentContainer = '';
19829    for(i=0;i<len;i+=1){
19830        if(this.layers[i].ddd && this.layers[i].ty !== 3){
19831            if(currentContainer !== '3d'){
19832                currentContainer = '3d';
19833                lastThreeDContainerData = this.createThreeDContainer(i,'3d');
19834            }
19835            lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos,i);
19836        } else {
19837            if(currentContainer !== '2d'){
19838                currentContainer = '2d';
19839                lastThreeDContainerData = this.createThreeDContainer(i,'2d');
19840            }
19841            lastThreeDContainerData.endPos = Math.max(lastThreeDContainerData.endPos,i);
19842        }
19843    }
19844    len = this.threeDElements.length;
19845    for(i = len - 1; i >= 0; i --) {
19846        this.resizerElem.appendChild(this.threeDElements[i].perspectiveElem);
19847    }
19848};
19849
19850HybridRenderer.prototype.addTo3dContainer = function(elem,pos){
19851    var i = 0, len = this.threeDElements.length;
19852    while(i<len){
19853        if(pos <= this.threeDElements[i].endPos){
19854            var j = this.threeDElements[i].startPos;
19855            var nextElement;
19856            while(j<pos){
19857                if(this.elements[j] && this.elements[j].getBaseElement){
19858                    nextElement = this.elements[j].getBaseElement();
19859                }
19860                j += 1;
19861            }
19862            if(nextElement){
19863                this.threeDElements[i].container.insertBefore(elem, nextElement);
19864            } else {
19865                this.threeDElements[i].container.appendChild(elem);
19866            }
19867            break;
19868        }
19869        i += 1;
19870    }
19871};
19872
19873HybridRenderer.prototype.configAnimation = function(animData){
19874    var resizerElem = createTag('div');
19875    var wrapper = this.animationItem.wrapper;
19876    resizerElem.style.width = animData.w+'px';
19877    resizerElem.style.height = animData.h+'px';
19878    this.resizerElem = resizerElem;
19879    styleDiv(resizerElem);
19880    resizerElem.style.transformStyle = resizerElem.style.webkitTransformStyle = resizerElem.style.mozTransformStyle = "flat";
19881    if(this.renderConfig.className) {
19882      resizerElem.setAttribute('class', this.renderConfig.className);
19883    }
19884    wrapper.appendChild(resizerElem);
19885
19886    resizerElem.style.overflow = 'hidden';
19887    var svg = createNS('svg');
19888    svg.setAttribute('width','1');
19889    svg.setAttribute('height','1');
19890    styleDiv(svg);
19891    this.resizerElem.appendChild(svg);
19892    var defs = createNS('defs');
19893    svg.appendChild(defs);
19894    this.data = animData;
19895    //Mask animation
19896    this.setupGlobalData(animData, svg);
19897    this.globalData.defs = defs;
19898    this.layers = animData.layers;
19899    this.layerElement = this.resizerElem;
19900    this.build3dContainers();
19901    this.updateContainerSize();
19902};
19903
19904HybridRenderer.prototype.destroy = function () {
19905    this.animationItem.wrapper.innerHTML = '';
19906    this.animationItem.container = null;
19907    this.globalData.defs = null;
19908    var i, len = this.layers ? this.layers.length : 0;
19909    for (i = 0; i < len; i++) {
19910        this.elements[i].destroy();
19911    }
19912    this.elements.length = 0;
19913    this.destroyed = true;
19914    this.animationItem = null;
19915};
19916
19917HybridRenderer.prototype.updateContainerSize = function () {
19918    var elementWidth = this.animationItem.wrapper.offsetWidth;
19919    var elementHeight = this.animationItem.wrapper.offsetHeight;
19920    var elementRel = elementWidth/elementHeight;
19921    var animationRel = this.globalData.compSize.w/this.globalData.compSize.h;
19922    var sx,sy,tx,ty;
19923    if(animationRel>elementRel){
19924        sx = elementWidth/(this.globalData.compSize.w);
19925        sy = elementWidth/(this.globalData.compSize.w);
19926        tx = 0;
19927        ty = ((elementHeight-this.globalData.compSize.h*(elementWidth/this.globalData.compSize.w))/2);
19928    }else{
19929        sx = elementHeight/(this.globalData.compSize.h);
19930        sy = elementHeight/(this.globalData.compSize.h);
19931        tx = (elementWidth-this.globalData.compSize.w*(elementHeight/this.globalData.compSize.h))/2;
19932        ty = 0;
19933    }
19934    this.resizerElem.style.transform = this.resizerElem.style.webkitTransform = 'matrix3d(' + sx + ',0,0,0,0,'+sy+',0,0,0,0,1,0,'+tx+','+ty+',0,1)';
19935};
19936
19937HybridRenderer.prototype.renderFrame = SVGRenderer.prototype.renderFrame;
19938
19939HybridRenderer.prototype.hide = function(){
19940    this.resizerElem.style.display = 'none';
19941};
19942
19943HybridRenderer.prototype.show = function(){
19944    this.resizerElem.style.display = 'block';
19945};
19946
19947HybridRenderer.prototype.initItems = function(){
19948    this.buildAllItems();
19949    if(this.camera){
19950        this.camera.setup();
19951    } else {
19952        var cWidth = this.globalData.compSize.w;
19953        var cHeight = this.globalData.compSize.h;
19954        var i, len = this.threeDElements.length;
19955        for(i=0;i<len;i+=1){
19956            this.threeDElements[i].perspectiveElem.style.perspective = this.threeDElements[i].perspectiveElem.style.webkitPerspective = Math.sqrt(Math.pow(cWidth,2) + Math.pow(cHeight,2)) + 'px';
19957        }
19958    }
19959};
19960
19961HybridRenderer.prototype.searchExtraCompositions = function(assets){
19962    var i, len = assets.length;
19963    var floatingContainer = createTag('div');
19964    for(i=0;i<len;i+=1){
19965        if(assets[i].xt){
19966            var comp = this.createComp(assets[i],floatingContainer,this.globalData.comp,null);
19967            comp.initExpressions();
19968            this.globalData.projectInterface.registerComposition(comp);
19969        }
19970    }
19971};
19972
19973function MaskElement(data,element,globalData) {
19974    this.data = data;
19975    this.element = element;
19976    this.globalData = globalData;
19977    this.storedData = [];
19978    this.masksProperties = this.data.masksProperties || [];
19979    this.maskElement = null;
19980    var defs = this.globalData.defs;
19981    var i, len = this.masksProperties ? this.masksProperties.length : 0;
19982    this.viewData = createSizedArray(len);
19983    this.solidPath = '';
19984
19985
19986    var path, properties = this.masksProperties;
19987    var count = 0;
19988    var currentMasks = [];
19989    var j, jLen;
19990    var layerId = createElementID();
19991    var rect, expansor, feMorph,x;
19992    var maskType = 'clipPath', maskRef = 'clip-path';
19993    for (i = 0; i < len; i++) {
19994        if((properties[i].mode !== 'a' && properties[i].mode !== 'n')|| properties[i].inv || properties[i].o.k !== 100 || properties[i].o.x){
19995            maskType = 'mask';
19996            maskRef = 'mask';
19997        }
19998
19999        if((properties[i].mode == 's' || properties[i].mode == 'i') && count === 0){
20000            rect = createNS( 'rect');
20001            rect.setAttribute('fill', '#ffffff');
20002            rect.setAttribute('width', this.element.comp.data.w || 0);
20003            rect.setAttribute('height', this.element.comp.data.h || 0);
20004            currentMasks.push(rect);
20005        } else {
20006            rect = null;
20007        }
20008
20009        path = createNS( 'path');
20010        if(properties[i].mode == 'n') {
20011            // TODO move this to a factory or to a constructor
20012            this.viewData[i] = {
20013                op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,this.element),
20014                prop: ShapePropertyFactory.getShapeProp(this.element,properties[i],3),
20015                elem: path,
20016                lastPath: ''
20017            };
20018            defs.appendChild(path);
20019            continue;
20020        }
20021        count += 1;
20022
20023        path.setAttribute('fill', properties[i].mode === 's' ? '#000000':'#ffffff');
20024        path.setAttribute('clip-rule','nonzero');
20025        var filterID;
20026
20027        if (properties[i].x.k !== 0) {
20028            maskType = 'mask';
20029            maskRef = 'mask';
20030            x = PropertyFactory.getProp(this.element,properties[i].x,0,null,this.element);
20031            filterID = createElementID();
20032            expansor = createNS('filter');
20033            expansor.setAttribute('id',filterID);
20034            feMorph = createNS('feMorphology');
20035            feMorph.setAttribute('operator','erode');
20036            feMorph.setAttribute('in','SourceGraphic');
20037            feMorph.setAttribute('radius','0');
20038            expansor.appendChild(feMorph);
20039            defs.appendChild(expansor);
20040            path.setAttribute('stroke', properties[i].mode === 's' ? '#000000':'#ffffff');
20041        } else {
20042            feMorph = null;
20043            x = null;
20044        }
20045
20046        // TODO move this to a factory or to a constructor
20047        this.storedData[i] = {
20048             elem: path,
20049             x: x,
20050             expan: feMorph,
20051            lastPath: '',
20052            lastOperator:'',
20053            filterId:filterID,
20054            lastRadius:0
20055        };
20056        if(properties[i].mode == 'i'){
20057            jLen = currentMasks.length;
20058            var g = createNS('g');
20059            for(j=0;j<jLen;j+=1){
20060                g.appendChild(currentMasks[j]);
20061            }
20062            var mask = createNS('mask');
20063            mask.setAttribute('mask-type','alpha');
20064            mask.setAttribute('id',layerId+'_'+count);
20065            mask.appendChild(path);
vendor: 5,004 bytes, lines 20066-20182
20066            defs.appendChild(mask);
20067            g.setAttribute('mask','url(' + locationHref + '#'+layerId+'_'+count+')');
20068
20069            currentMasks.length = 0;
20070            currentMasks.push(g);
20071        }else{
20072            currentMasks.push(path);
20073        }
20074        if(properties[i].inv && !this.solidPath){
20075            this.solidPath = this.createLayerSolidPath();
20076        }
20077        // TODO move this to a factory or to a constructor
20078        this.viewData[i] = {
20079            elem: path,
20080            lastPath: '',
20081            op: PropertyFactory.getProp(this.element,properties[i].o,0,0.01,this.element),
20082            prop:ShapePropertyFactory.getShapeProp(this.element,properties[i],3),
20083            invRect: rect
20084        };
20085        if(!this.viewData[i].prop.k){
20086            this.drawPath(properties[i],this.viewData[i].prop.v,this.viewData[i]);
20087        }
20088    }
20089
20090    this.maskElement = createNS( maskType);
20091
20092    len = currentMasks.length;
20093    for(i=0;i<len;i+=1){
20094        this.maskElement.appendChild(currentMasks[i]);
20095    }
20096
20097    if(count > 0){
20098        this.maskElement.setAttribute('id', layerId);
20099        this.element.maskedElement.setAttribute(maskRef, "url(" + locationHref + "#" + layerId + ")");
20100        defs.appendChild(this.maskElement);
20101    }
20102    if (this.viewData.length) {
20103        this.element.addRenderableComponent(this);
20104    }
20105
20106}
20107
20108MaskElement.prototype.getMaskProperty = function(pos){
20109    return this.viewData[pos].prop;
20110};
20111
20112MaskElement.prototype.renderFrame = function (isFirstFrame) {
20113    var finalMat = this.element.finalTransform.mat;
20114    var i, len = this.masksProperties.length;
20115    for (i = 0; i < len; i++) {
20116        if(this.viewData[i].prop._mdf || isFirstFrame){
20117            this.drawPath(this.masksProperties[i],this.viewData[i].prop.v,this.viewData[i]);
20118        }
20119        if(this.viewData[i].op._mdf || isFirstFrame){
20120            this.viewData[i].elem.setAttribute('fill-opacity',this.viewData[i].op.v);
20121        }
20122        if(this.masksProperties[i].mode !== 'n'){
20123            if(this.viewData[i].invRect && (this.element.finalTransform.mProp._mdf || isFirstFrame)){
20124                this.viewData[i].invRect.setAttribute('x', -finalMat.props[12]);
20125                this.viewData[i].invRect.setAttribute('y', -finalMat.props[13]);
20126            }
20127            if(this.storedData[i].x && (this.storedData[i].x._mdf || isFirstFrame)){
20128                var feMorph = this.storedData[i].expan;
20129                if(this.storedData[i].x.v < 0){
20130                    if(this.storedData[i].lastOperator !== 'erode'){
20131                        this.storedData[i].lastOperator = 'erode';
20132                        this.storedData[i].elem.setAttribute('filter','url(' + locationHref + '#'+this.storedData[i].filterId+')');
20133                    }
20134                    feMorph.setAttribute('radius',-this.storedData[i].x.v);
20135                }else{
20136                    if(this.storedData[i].lastOperator !== 'dilate'){
20137                        this.storedData[i].lastOperator = 'dilate';
20138                        this.storedData[i].elem.setAttribute('filter',null);
20139                    }
20140                    this.storedData[i].elem.setAttribute('stroke-width', this.storedData[i].x.v*2);
20141
20142                }
20143            }
20144        }
20145    }
20146};
20147
20148MaskElement.prototype.getMaskelement = function () {
20149    return this.maskElement;
20150};
20151
20152MaskElement.prototype.createLayerSolidPath = function(){
20153    var path = 'M0,0 ';
20154    path += ' h' + this.globalData.compSize.w ;
20155    path += ' v' + this.globalData.compSize.h ;
20156    path += ' h-' + this.globalData.compSize.w ;
20157    path += ' v-' + this.globalData.compSize.h + ' ';
20158    return path;
20159};
20160
20161MaskElement.prototype.drawPath = function(pathData,pathNodes,viewData){
20162    var pathString = " M"+pathNodes.v[0][0]+','+pathNodes.v[0][1];
20163    var i, len;
20164    len = pathNodes._length;
20165    for(i=1;i<len;i+=1){
20166        //pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[i][0]+','+pathNodes.i[i][1] + " "+pathNodes.v[i][0]+','+pathNodes.v[i][1];
20167        pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[i][0]+','+pathNodes.i[i][1] + " "+pathNodes.v[i][0]+','+pathNodes.v[i][1];
20168    }
20169        //pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[0][0]+','+pathNodes.i[0][1] + " "+pathNodes.v[0][0]+','+pathNodes.v[0][1];
20170    if(pathNodes.c && len > 1){
20171        pathString += " C"+pathNodes.o[i-1][0]+','+pathNodes.o[i-1][1] + " "+pathNodes.i[0][0]+','+pathNodes.i[0][1] + " "+pathNodes.v[0][0]+','+pathNodes.v[0][1];
20172    }
20173    //pathNodes.__renderedString = pathString;
20174
20175    if(viewData.lastPath !== pathString){
20176        var pathShapeValue = '';
20177        if(viewData.elem){
20178            if(pathNodes.c){
20179                pathShapeValue = pathData.inv ? this.solidPath + pathString : pathString;
20180            }
20181            viewData.elem.setAttribute('d',pathShapeValue);
20182        }
vendor: 9,707 bytes, lines 20183-20492
20183        viewData.lastPath = pathString;
20184    }
20185};
20186
20187MaskElement.prototype.destroy = function(){
20188    this.element = null;
20189    this.globalData = null;
20190    this.maskElement = null;
20191    this.data = null;
20192    this.masksProperties = null;
20193};
20194
20195/**
20196 * @file 
20197 * Handles AE's layer parenting property.
20198 *
20199 */
20200
20201function HierarchyElement(){}
20202
20203HierarchyElement.prototype = {
20204	/**
20205     * @function 
20206     * Initializes hierarchy properties
20207     *
20208     */
20209	initHierarchy: function() {
20210		//element's parent list
20211	    this.hierarchy = [];
20212	    //if element is parent of another layer _isParent will be true
20213	    this._isParent = false;
20214	    this.checkParenting();
20215	},
20216	/**
20217     * @function 
20218     * Sets layer's hierarchy.
20219     * @param {array} hierarch
20220     * layer's parent list
20221     *
20222     */ 
20223	setHierarchy: function(hierarchy){
20224	    this.hierarchy = hierarchy;
20225	},
20226	/**
20227     * @function 
20228     * Sets layer as parent.
20229     *
20230     */ 
20231	setAsParent: function() {
20232	    this._isParent = true;
20233	},
20234	/**
20235     * @function 
20236     * Searches layer's parenting chain
20237     *
20238     */ 
20239	checkParenting: function(){
20240	    if (this.data.parent !== undefined){
20241	        this.comp.buildElementParenting(this, this.data.parent, []);
20242	    }
20243	}
20244};
20245/**
20246 * @file 
20247 * Handles element's layer frame update.
20248 * Checks layer in point and out point
20249 *
20250 */
20251
20252function FrameElement(){}
20253
20254FrameElement.prototype = {
20255    /**
20256     * @function 
20257     * Initializes frame related properties.
20258     *
20259     */
20260    initFrame: function(){
20261        //set to true when inpoint is rendered
20262        this._isFirstFrame = false;
20263        //list of animated properties
20264        this.dynamicProperties = [];
20265        // If layer has been modified in current tick this will be true
20266        this._mdf = false;
20267    },
20268    /**
20269     * @function 
20270     * Calculates all dynamic values
20271     *
20272     * @param {number} num
20273     * current frame number in Layer's time
20274     * @param {boolean} isVisible
20275     * if layers is currently in range
20276     * 
20277     */
20278    prepareProperties: function(num, isVisible) {
20279        var i, len = this.dynamicProperties.length;
20280        for (i = 0;i < len; i += 1) {
20281            if (isVisible || (this._isParent && this.dynamicProperties[i].propType === 'transform')) {
20282                this.dynamicProperties[i].getValue();
20283                if (this.dynamicProperties[i]._mdf) {
20284                    this.globalData._mdf = true;
20285                    this._mdf = true;
20286                }
20287            }
20288        }
20289    },
20290    addDynamicProperty: function(prop) {
20291        if(this.dynamicProperties.indexOf(prop) === -1) {
20292            this.dynamicProperties.push(prop);
20293        }
20294    }
20295};
20296function TransformElement(){}
20297
20298TransformElement.prototype = {
20299    initTransform: function() {
20300        this.finalTransform = {
20301            mProp: this.data.ks ? TransformPropertyFactory.getTransformProperty(this, this.data.ks, this) : {o:0},
20302            _matMdf: false,
20303            _opMdf: false,
20304            mat: new Matrix()
20305        };
20306        if (this.data.ao) {
20307            this.finalTransform.mProp.autoOriented = true;
20308        }
20309
20310        //TODO: check TYPE 11: Guided elements
20311        if (this.data.ty !== 11) {
20312            //this.createElements();
20313        }
20314    },
20315    renderTransform: function() {
20316
20317        this.finalTransform._opMdf = this.finalTransform.mProp.o._mdf || this._isFirstFrame;
20318        this.finalTransform._matMdf = this.finalTransform.mProp._mdf || this._isFirstFrame;
20319
20320        if (this.hierarchy) {
20321            var mat;
20322            var finalMat = this.finalTransform.mat;
20323            var i = 0, len = this.hierarchy.length;
20324            //Checking if any of the transformation matrices in the hierarchy chain has changed.
20325            if (!this.finalTransform._matMdf) {
20326                while (i < len) {
20327                    if (this.hierarchy[i].finalTransform.mProp._mdf) {
20328                        this.finalTransform._matMdf = true;
20329                        break;
20330                    }
20331                    i += 1;
20332                }
20333            }
20334            
20335            if (this.finalTransform._matMdf) {
20336                mat = this.finalTransform.mProp.v.props;
20337                finalMat.cloneFromProps(mat);
20338                for (i = 0; i < len; i += 1) {
20339                    mat = this.hierarchy[i].finalTransform.mProp.v.props;
20340                    finalMat.transform(mat[0], mat[1], mat[2], mat[3], mat[4], mat[5], mat[6], mat[7], mat[8], mat[9], mat[10], mat[11], mat[12], mat[13], mat[14], mat[15]);
20341                }
20342            }
20343        }
20344    },
20345    globalToLocal: function(pt) {
20346        var transforms = [];
20347        transforms.push(this.finalTransform);
20348        var flag = true;
20349        var comp = this.comp;
20350        while (flag) {
20351            if (comp.finalTransform) {
20352                if (comp.data.hasMask) {
20353                    transforms.splice(0, 0, comp.finalTransform);
20354                }
20355                comp = comp.comp;
20356            } else {
20357                flag = false;
20358            }
20359        }
20360        var i, len = transforms.length,ptNew;
20361        for (i = 0; i < len; i += 1) {
20362            ptNew = transforms[i].mat.applyToPointArray(0, 0, 0);
20363            //ptNew = transforms[i].mat.applyToPointArray(pt[0],pt[1],pt[2]);
20364            pt = [pt[0] - ptNew[0], pt[1] - ptNew[1], 0];
20365        }
20366        return pt;
20367    },
20368    mHelper: new Matrix()
20369};
20370function RenderableElement(){
20371
20372}
20373
20374RenderableElement.prototype = {
20375    initRenderable: function() {
20376        //layer's visibility related to inpoint and outpoint. Rename isVisible to isInRange
20377        this.isInRange = false;
20378        //layer's display state
20379        this.hidden = false;
20380        // If layer's transparency equals 0, it can be hidden
20381        this.isTransparent = false;
20382        //list of animated components
20383        this.renderableComponents = [];
20384    },
20385    addRenderableComponent: function(component) {
20386        if(this.renderableComponents.indexOf(component) === -1) {
20387            this.renderableComponents.push(component);
20388        }
20389    },
20390    removeRenderableComponent: function(component) {
20391        if(this.renderableComponents.indexOf(component) !== -1) {
20392            this.renderableComponents.splice(this.renderableComponents.indexOf(component), 1);
20393        }
20394    },
20395    prepareRenderableFrame: function(num) {
20396        this.checkLayerLimits(num);
20397    },
20398    checkTransparency: function(){
20399        if(this.finalTransform.mProp.o.v <= 0) {
20400            if(!this.isTransparent && this.globalData.renderConfig.hideOnTransparent){
20401                this.isTransparent = true;
20402                this.hide();
20403            }
20404        } else if(this.isTransparent) {
20405            this.isTransparent = false;
20406            this.show();
20407        }
20408    },
20409    /**
20410     * @function 
20411     * Initializes frame related properties.
20412     *
20413     * @param {number} num
20414     * current frame number in Layer's time
20415     * 
20416     */
20417    checkLayerLimits: function(num) {
20418        if(this.data.ip - this.data.st <= num && this.data.op - this.data.st > num)
20419        {
20420            if(this.isInRange !== true){
20421                this.globalData._mdf = true;
20422                this._mdf = true;
20423                this.isInRange = true;
20424                this.show();
20425            }
20426        } else {
20427            if(this.isInRange !== false){
20428                this.globalData._mdf = true;
20429                this.isInRange = false;
20430                this.hide();
20431            }
20432        }
20433    },
20434    renderRenderable: function() {
20435        var i, len = this.renderableComponents.length;
20436        for(i = 0; i < len; i += 1) {
20437            this.renderableComponents[i].renderFrame(this._isFirstFrame);
20438        }
20439        /*this.maskManager.renderFrame(this.finalTransform.mat);
20440        this.renderableEffectsManager.renderFrame(this._isFirstFrame);*/
20441    },
20442    sourceRectAtTime: function(){
20443        return {
20444            top:0,
20445            left:0,
20446            width:100,
20447            height:100
20448        };
20449    },
20450    getLayerSize: function(){
20451        if(this.data.ty === 5){
20452            return {w:this.data.textData.width,h:this.data.textData.height};
20453        }else{
20454            return {w:this.data.width,h:this.data.height};
20455        }
20456    }
20457};
20458function RenderableDOMElement() {}
20459
20460(function(){
20461    var _prototype = {
20462        initElement: function(data,globalData,comp) {
20463            this.initFrame();
20464            this.initBaseData(data, globalData, comp);
20465            this.initTransform(data, globalData, comp);
20466            this.initHierarchy();
20467            this.initRenderable();
20468            this.initRendererElement();
20469            this.createContainerElements();
20470            this.createRenderableComponents();
20471            this.createContent();
20472            this.hide();
20473        },
20474        hide: function(){
20475            if (!this.hidden && (!this.isInRange || this.isTransparent)) {
20476                var elem = this.baseElement || this.layerElement;
20477                elem.style.display = 'none';
20478                this.hidden = true;
20479            }
20480        },
20481        show: function(){
20482            if (this.isInRange && !this.isTransparent){
20483                if (!this.data.hd) {
20484                    var elem = this.baseElement || this.layerElement;
20485                    elem.style.display = 'block';
20486                }
20487                this.hidden = false;
20488                this._isFirstFrame = true;
20489            }
20490        },
20491        renderFrame: function() {
20492            //If it is exported as hidden (data.hd === true) no need to render
vendor: 13,007 bytes, lines 20493-20840
20493            //If it is not visible no need to render
20494            if (this.data.hd || this.hidden) {
20495                return;
20496            }
20497            this.renderTransform();
20498            this.renderRenderable();
20499            this.renderElement();
20500            this.renderInnerContent();
20501            if (this._isFirstFrame) {
20502                this._isFirstFrame = false;
20503            }
20504        },
20505        renderInnerContent: function() {},
20506        prepareFrame: function(num) {
20507            this._mdf = false;
20508            this.prepareRenderableFrame(num);
20509            this.prepareProperties(num, this.isInRange);
20510            this.checkTransparency();
20511        },
20512        destroy: function(){
20513            this.innerElem =  null;
20514            this.destroyBaseElement();
20515        }
20516    };
20517    extendPrototype([RenderableElement, createProxyFunction(_prototype)], RenderableDOMElement);
20518}());
20519function ProcessedElement(element, position) {
20520	this.elem = element;
20521	this.pos = position;
20522}
20523function SVGStyleData(data, level) {
20524	this.data = data;
20525	this.type = data.ty;
20526	this.d = '';
20527	this.lvl = level;
20528	this._mdf = false;
20529	this.closed = data.hd === true;
20530	this.pElem = createNS('path');
20531	this.msElem = null;
20532}
20533
20534SVGStyleData.prototype.reset = function() {
20535	this.d = '';
20536	this._mdf = false;
20537};
20538function SVGShapeData(transformers, level, shape) {
20539    this.caches = [];
20540    this.styles = [];
20541    this.transformers = transformers;
20542    this.lStr = '';
20543    this.sh = shape;
20544    this.lvl = level;
20545    //TODO find if there are some cases where _isAnimated can be false. 
20546    // For now, since shapes add up with other shapes. They have to be calculated every time.
20547    // One way of finding out is checking if all styles associated to this shape depend only of this shape
20548    this._isAnimated = !!shape.k;
20549    // TODO: commenting this for now since all shapes are animated
20550    var i = 0, len = transformers.length;
20551    while(i < len) {
20552    	if(transformers[i].mProps.dynamicProperties.length) {
20553    		this._isAnimated = true;
20554    		break;
20555    	}
20556    	i += 1;
20557    }
20558}
20559
20560SVGShapeData.prototype.setAsAnimated = function() {
20561    this._isAnimated = true;
20562}
20563function SVGTransformData(mProps, op, container) {
20564	this.transform = {
20565		mProps: mProps,
20566		op: op,
20567		container: container
20568	};
20569	this.elements = [];
20570    this._isAnimated = this.transform.mProps.dynamicProperties.length || this.transform.op.effectsSequence.length;
20571}
20572function SVGStrokeStyleData(elem, data, styleOb){
20573	this.initDynamicPropertyContainer(elem);
20574	this.getValue = this.iterateDynamicProperties;
20575	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,this);
20576	this.w = PropertyFactory.getProp(elem,data.w,0,null,this);
20577	this.d = new DashProperty(elem,data.d||{},'svg',this);
20578	this.c = PropertyFactory.getProp(elem,data.c,1,255,this);
20579	this.style = styleOb;
20580    this._isAnimated = !!this._isAnimated;
20581}
20582
20583extendPrototype([DynamicPropertyContainer], SVGStrokeStyleData);
20584function SVGFillStyleData(elem, data, styleOb){
20585	this.initDynamicPropertyContainer(elem);
20586	this.getValue = this.iterateDynamicProperties;
20587	this.o = PropertyFactory.getProp(elem,data.o,0,0.01,this);
20588	this.c = PropertyFactory.getProp(elem,data.c,1,255,this);
20589	this.style = styleOb;
20590}
20591
20592extendPrototype([DynamicPropertyContainer], SVGFillStyleData);
20593function SVGGradientFillStyleData(elem, data, styleOb){
20594    this.initDynamicPropertyContainer(elem);
20595    this.getValue = this.iterateDynamicProperties;
20596    this.initGradientData(elem, data, styleOb);
20597}
20598
20599SVGGradientFillStyleData.prototype.initGradientData = function(elem, data, styleOb){
20600    this.o = PropertyFactory.getProp(elem,data.o,0,0.01,this);
20601    this.s = PropertyFactory.getProp(elem,data.s,1,null,this);
20602    this.e = PropertyFactory.getProp(elem,data.e,1,null,this);
20603    this.h = PropertyFactory.getProp(elem,data.h||{k:0},0,0.01,this);
20604    this.a = PropertyFactory.getProp(elem,data.a||{k:0},0,degToRads,this);
20605    this.g = new GradientProperty(elem,data.g,this);
20606    this.style = styleOb;
20607    this.stops = [];
20608    this.setGradientData(styleOb.pElem, data);
20609    this.setGradientOpacity(data, styleOb);
20610    this._isAnimated = !!this._isAnimated;
20611
20612};
20613
20614SVGGradientFillStyleData.prototype.setGradientData = function(pathElement,data){
20615
20616    var gradientId = createElementID();
20617    var gfill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
20618    gfill.setAttribute('id',gradientId);
20619    gfill.setAttribute('spreadMethod','pad');
20620    gfill.setAttribute('gradientUnits','userSpaceOnUse');
20621    var stops = [];
20622    var stop, j, jLen;
20623    jLen = data.g.p*4;
20624    for(j=0;j<jLen;j+=4){
20625        stop = createNS('stop');
20626        gfill.appendChild(stop);
20627        stops.push(stop);
20628    }
20629    pathElement.setAttribute( data.ty === 'gf' ? 'fill':'stroke','url(' + locationHref + '#'+gradientId+')');
20630    
20631    this.gf = gfill;
20632    this.cst = stops;
20633};
20634
20635SVGGradientFillStyleData.prototype.setGradientOpacity = function(data, styleOb){
20636    if(this.g._hasOpacity && !this.g._collapsable){
20637        var stop, j, jLen;
20638        var mask = createNS("mask");
20639        var maskElement = createNS( 'path');
20640        mask.appendChild(maskElement);
20641        var opacityId = createElementID();
20642        var maskId = createElementID();
20643        mask.setAttribute('id',maskId);
20644        var opFill = createNS(data.t === 1 ? 'linearGradient' : 'radialGradient');
20645        opFill.setAttribute('id',opacityId);
20646        opFill.setAttribute('spreadMethod','pad');
20647        opFill.setAttribute('gradientUnits','userSpaceOnUse');
20648        jLen = data.g.k.k[0].s ? data.g.k.k[0].s.length : data.g.k.k.length;
20649        var stops = this.stops;
20650        for(j=data.g.p*4;j<jLen;j+=2){
20651            stop = createNS('stop');
20652            stop.setAttribute('stop-color','rgb(255,255,255)');
20653            opFill.appendChild(stop);
20654            stops.push(stop);
20655        }
20656        maskElement.setAttribute( data.ty === 'gf' ? 'fill':'stroke','url(' + locationHref + '#'+opacityId+')');
20657        this.of = opFill;
20658        this.ms = mask;
20659        this.ost = stops;
20660        this.maskId = maskId;
20661        styleOb.msElem = maskElement;
20662    }
20663};
20664
20665extendPrototype([DynamicPropertyContainer], SVGGradientFillStyleData);
20666function SVGGradientStrokeStyleData(elem, data, styleOb){
20667	this.initDynamicPropertyContainer(elem);
20668	this.getValue = this.iterateDynamicProperties;
20669	this.w = PropertyFactory.getProp(elem,data.w,0,null,this);
20670	this.d = new DashProperty(elem,data.d||{},'svg',this);
20671    this.initGradientData(elem, data, styleOb);
20672    this._isAnimated = !!this._isAnimated;
20673}
20674
20675extendPrototype([SVGGradientFillStyleData, DynamicPropertyContainer], SVGGradientStrokeStyleData);
20676function ShapeGroupData() {
20677	this.it = [];
20678    this.prevViewData = [];
20679    this.gr = createNS('g');
20680}
20681var SVGElementsRenderer = (function() {
20682	var _identityMatrix = new Matrix();
20683	var _matrixHelper = new Matrix();
20684
20685	var ob = {
20686		createRenderFunction: createRenderFunction
20687	}
20688
20689	function createRenderFunction(data) {
20690	    var ty = data.ty;
20691	    switch(data.ty) {
20692	        case 'fl':
20693	        return renderFill;
20694	        case 'gf':
20695	        return renderGradient;
20696	        case 'gs':
20697	        return renderGradientStroke;
20698	        case 'st':
20699	        return renderStroke;
20700	        case 'sh':
20701	        case 'el':
20702	        case 'rc':
20703	        case 'sr':
20704	        return renderPath;
20705	        case 'tr':
20706	        return renderContentTransform;
20707	    }
20708	}
20709
20710	function renderContentTransform(styleData, itemData, isFirstFrame) {
20711	    if(isFirstFrame || itemData.transform.op._mdf){
20712	        itemData.transform.container.setAttribute('opacity',itemData.transform.op.v);
20713	    }
20714	    if(isFirstFrame || itemData.transform.mProps._mdf){
20715	        itemData.transform.container.setAttribute('transform',itemData.transform.mProps.v.to2dCSS());
20716	    }
20717	}
20718
20719	function renderPath(styleData, itemData, isFirstFrame) {
20720	    var j, jLen,pathStringTransformed,redraw,pathNodes,l, lLen = itemData.styles.length;
20721	    var lvl = itemData.lvl;
20722	    var paths, mat, props, iterations, k;
20723	    for(l=0;l<lLen;l+=1){
20724	        redraw = itemData.sh._mdf || isFirstFrame;
20725	        if(itemData.styles[l].lvl < lvl){
20726	            mat = _matrixHelper.reset();
20727	            iterations = lvl - itemData.styles[l].lvl;
20728	            k = itemData.transformers.length-1;
20729	            while(!redraw && iterations > 0) {
20730	                redraw = itemData.transformers[k].mProps._mdf || redraw;
20731	                iterations --;
20732	                k --;
20733	            }
20734	            if(redraw) {
20735	                iterations = lvl - itemData.styles[l].lvl;
20736	                k = itemData.transformers.length-1;
20737	                while(iterations > 0) {
20738	                    props = itemData.transformers[k].mProps.v.props;
20739	                    mat.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
20740	                    iterations --;
20741	                    k --;
20742	                }
20743	            }
20744	        } else {
20745	            mat = _identityMatrix;
20746	        }
20747	        paths = itemData.sh.paths;
20748	        jLen = paths._length;
20749	        if(redraw){
20750	            pathStringTransformed = '';
20751	            for(j=0;j<jLen;j+=1){
20752	                pathNodes = paths.shapes[j];
20753	                if(pathNodes && pathNodes._length){
20754	                    pathStringTransformed += buildShapeString(pathNodes, pathNodes._length, pathNodes.c, mat);
20755	                }
20756	            }
20757	            itemData.caches[l] = pathStringTransformed;
20758	        } else {
20759	            pathStringTransformed = itemData.caches[l];
20760	        }
20761	        itemData.styles[l].d += styleData.hd === true ? '' : pathStringTransformed;
20762	        itemData.styles[l]._mdf = redraw || itemData.styles[l]._mdf;
20763	    }
20764	}
20765
20766	function renderFill (styleData,itemData, isFirstFrame){
20767	    var styleElem = itemData.style;
20768
20769	    if(itemData.c._mdf || isFirstFrame){
20770	        styleElem.pElem.setAttribute('fill','rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')');
20771	    }
20772	    if(itemData.o._mdf || isFirstFrame){
20773	        styleElem.pElem.setAttribute('fill-opacity',itemData.o.v);
20774	    }
20775	};
20776
20777	function renderGradientStroke (styleData, itemData, isFirstFrame) {
20778	    renderGradient(styleData, itemData, isFirstFrame);
20779	    renderStroke(styleData, itemData, isFirstFrame);
20780	}
20781
20782	function renderGradient(styleData, itemData, isFirstFrame) {
20783	    var gfill = itemData.gf;
20784	    var hasOpacity = itemData.g._hasOpacity;
20785	    var pt1 = itemData.s.v, pt2 = itemData.e.v;
20786
20787	    if (itemData.o._mdf || isFirstFrame) {
20788	        var attr = styleData.ty === 'gf' ? 'fill-opacity' : 'stroke-opacity';
20789	        itemData.style.pElem.setAttribute(attr, itemData.o.v);
20790	    }
20791	    if (itemData.s._mdf || isFirstFrame) {
20792	        var attr1 = styleData.t === 1 ? 'x1' : 'cx';
20793	        var attr2 = attr1 === 'x1' ? 'y1' : 'cy';
20794	        gfill.setAttribute(attr1, pt1[0]);
20795	        gfill.setAttribute(attr2, pt1[1]);
20796	        if (hasOpacity && !itemData.g._collapsable) {
20797	            itemData.of.setAttribute(attr1, pt1[0]);
20798	            itemData.of.setAttribute(attr2, pt1[1]);
20799	        }
20800	    }
20801	    var stops, i, len, stop;
20802	    if (itemData.g._cmdf || isFirstFrame) {
20803	        stops = itemData.cst;
20804	        var cValues = itemData.g.c;
20805	        len = stops.length;
20806	        for (i = 0; i < len; i += 1){
20807	            stop = stops[i];
20808	            stop.setAttribute('offset', cValues[i * 4] + '%');
20809	            stop.setAttribute('stop-color','rgb('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ')');
20810	        }
20811	    }
20812	    if (hasOpacity && (itemData.g._omdf || isFirstFrame)) {
20813	        var oValues = itemData.g.o;
20814	        if(itemData.g._collapsable) {
20815	            stops = itemData.cst;
20816	        } else {
20817	            stops = itemData.ost;
20818	        }
20819	        len = stops.length;
20820	        for (i = 0; i < len; i += 1) {
20821	            stop = stops[i];
20822	            if(!itemData.g._collapsable) {
20823	                stop.setAttribute('offset', oValues[i * 2] + '%');
20824	            }
20825	            stop.setAttribute('stop-opacity', oValues[i * 2 + 1]);
20826	        }
20827	    }
20828	    if (styleData.t === 1) {
20829	        if (itemData.e._mdf  || isFirstFrame) {
20830	            gfill.setAttribute('x2', pt2[0]);
20831	            gfill.setAttribute('y2', pt2[1]);
20832	            if (hasOpacity && !itemData.g._collapsable) {
20833	                itemData.of.setAttribute('x2', pt2[0]);
20834	                itemData.of.setAttribute('y2', pt2[1]);
20835	            }
20836	        }
20837	    } else {
20838	        var rad;
20839	        if (itemData.s._mdf || itemData.e._mdf || isFirstFrame) {
20840	            rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
vendor: 1,093 bytes, lines 20841-20866
20841	            gfill.setAttribute('r', rad);
20842	            if(hasOpacity && !itemData.g._collapsable){
20843	                itemData.of.setAttribute('r', rad);
20844	            }
20845	        }
20846	        if (itemData.e._mdf || itemData.h._mdf || itemData.a._mdf || isFirstFrame) {
20847	            if (!rad) {
20848	                rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
20849	            }
20850	            var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
20851
20852	            var percent = itemData.h.v >= 1 ? 0.99 : itemData.h.v <= -1 ? -0.99: itemData.h.v;
20853	            var dist = rad * percent;
20854	            var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
20855	            var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
20856	            gfill.setAttribute('fx', x);
20857	            gfill.setAttribute('fy', y);
20858	            if (hasOpacity && !itemData.g._collapsable) {
20859	                itemData.of.setAttribute('fx', x);
20860	                itemData.of.setAttribute('fy', y);
20861	            }
20862	        }
20863	        //gfill.setAttribute('fy','200');
20864	    }
20865	};
20866
20867	function renderStroke(styleData, itemData, isFirstFrame) {
20868	    var styleElem = itemData.style;
20869	    var d = itemData.d;
20870	    if (d && (d._mdf || isFirstFrame) && d.dashStr) {
20871	        styleElem.pElem.setAttribute('stroke-dasharray', d.dashStr);
20872	        styleElem.pElem.setAttribute('stroke-dashoffset', d.dashoffset[0]);
20873	    }
20874	    if(itemData.c && (itemData.c._mdf || isFirstFrame)){
20875	        styleElem.pElem.setAttribute('stroke','rgb(' + bm_floor(itemData.c.v[0]) + ',' + bm_floor(itemData.c.v[1]) + ',' + bm_floor(itemData.c.v[2]) + ')');
20876	    }
20877	    if(itemData.o._mdf || isFirstFrame){
20878	        styleElem.pElem.setAttribute('stroke-opacity', itemData.o.v);
20879	    }
20880	    if(itemData.w._mdf || isFirstFrame){
20881	        styleElem.pElem.setAttribute('stroke-width', itemData.w.v);
20882	        if(styleElem.msElem){
20883	            styleElem.msElem.setAttribute('stroke-width', itemData.w.v);
20884	        }
20885	    }
20886	};
20887
20888	return ob;
20889}())
20890function ShapeTransformManager() {
20891	this.sequences = {};
20892	this.sequenceList = [];
20893    this.transform_key_count = 0;
20894}
20895
20896ShapeTransformManager.prototype = {
20897	addTransformSequence: function(transforms) {
20898		var i, len = transforms.length;
20899		var key = '_';
20900		for(i = 0; i < len; i += 1) {
20901			key += transforms[i].transform.key + '_';
20902		}
20903		var sequence = this.sequences[key];
20904		if(!sequence) {
20905			sequence = {
20906				transforms: [].concat(transforms),
20907				finalTransform: new Matrix(),
20908				_mdf: false
20909			};
20910			this.sequences[key] = sequence;
20911			this.sequenceList.push(sequence);
20912		}
20913		return sequence;
20914	},
20915	processSequence: function(sequence, isFirstFrame) {
20916		var i = 0, len = sequence.transforms.length, _mdf = isFirstFrame;
20917		while (i < len && !isFirstFrame) {
20918			if (sequence.transforms[i].transform.mProps._mdf) {
20919				_mdf = true;
20920				break;
20921			}
20922			i += 1
20923		}
20924		if (_mdf) {
20925			var props;
20926			sequence.finalTransform.reset();
20927			for (i = len - 1; i >= 0; i -= 1) {
20928		        props = sequence.transforms[i].transform.mProps.v.props;
20929		        sequence.finalTransform.transform(props[0],props[1],props[2],props[3],props[4],props[5],props[6],props[7],props[8],props[9],props[10],props[11],props[12],props[13],props[14],props[15]);
20930			}
20931		}
20932		sequence._mdf = _mdf;
20933		
20934	},
20935	processSequences: function(isFirstFrame) {
20936		var i, len = this.sequenceList.length;
20937		for (i = 0; i < len; i += 1) {
20938			this.processSequence(this.sequenceList[i], isFirstFrame);
20939		}
20940
20941	},
20942	getNewKey: function() {
20943		return '_' + this.transform_key_count++;
20944	}
20945}
20946function CVShapeData(element, data, styles, transformsManager) {
20947    this.styledShapes = [];
20948    this.tr = [0,0,0,0,0,0];
20949    var ty = 4;
20950    if(data.ty == 'rc'){
20951        ty = 5;
20952    }else if(data.ty == 'el'){
20953        ty = 6;
20954    }else if(data.ty == 'sr'){
20955        ty = 7;
20956    }
20957    this.sh = ShapePropertyFactory.getShapeProp(element,data,ty,element);
20958    var i , len = styles.length,styledShape;
20959    for (i = 0; i < len; i += 1) {
20960        if (!styles[i].closed) {
20961            styledShape = {
20962                transforms: transformsManager.addTransformSequence(styles[i].transforms),
20963                trNodes: []
20964            }
20965            this.styledShapes.push(styledShape);
20966            styles[i].elements.push(styledShape);
20967        }
20968    }
20969}
20970
20971CVShapeData.prototype.setAsAnimated = SVGShapeData.prototype.setAsAnimated;
20972function BaseElement(){
20973}
20974
20975BaseElement.prototype = {
20976    checkMasks: function(){
20977        if(!this.data.hasMask){
20978            return false;
20979        }
20980        var i = 0, len = this.data.masksProperties.length;
20981        while(i<len) {
20982            if((this.data.masksProperties[i].mode !== 'n' && this.data.masksProperties[i].cl !== false)) {
20983                return true;
20984            }
20985            i += 1;
20986        }
20987        return false;
20988    },
20989    initExpressions: function(){
20990        this.layerInterface = LayerExpressionInterface(this);
20991        if(this.data.hasMask && this.maskManager) {
20992            this.layerInterface.registerMaskInterface(this.maskManager);
20993        }
20994        var effectsInterface = EffectsExpressionInterface.createEffe
vendor: 9,125 bytes, lines 20994-21209
20994ctsInterface(this,this.layerInterface);
20995        this.layerInterface.registerEffectsInterface(effectsInterface);
20996
20997        if(this.data.ty === 0 || this.data.xt){
20998            this.compInterface = CompExpressionInterface(this);
20999        } else if(this.data.ty === 4){
21000            this.layerInterface.shapeInterface = ShapeExpressionInterface(this.shapesData,this.itemsData,this.layerInterface);
21001            this.layerInterface.content = this.layerInterface.shapeInterface;
21002        } else if(this.data.ty === 5){
21003            this.layerInterface.textInterface = TextExpressionInterface(this);
21004            this.layerInterface.text = this.layerInterface.textInterface;
21005        }
21006    },
21007    setBlendMode: function(){
21008        var blendModeValue = getBlendMode(this.data.bm);
21009        var elem = this.baseElement || this.layerElement;
21010
21011        elem.style['mix-blend-mode'] = blendModeValue;
21012    },
21013    initBaseData: function(data, globalData, comp){
21014        this.globalData = globalData;
21015        this.comp = comp;
21016        this.data = data;
21017        this.layerId = createElementID();
21018        
21019        //Stretch factor for old animations missing this property.
21020        if(!this.data.sr){
21021            this.data.sr = 1;
21022        }
21023        // effects manager
21024        this.effectsManager = new EffectsManager(this.data,this,this.dynamicProperties);
21025        
21026    },
21027    getType: function(){
21028        return this.type;
21029    }
21030    ,sourceRectAtTime: function(){}
21031}
21032function NullElement(data,globalData,comp){
21033    this.initFrame();
21034	this.initBaseData(data, globalData, comp);
21035    this.initFrame();
21036    this.initTransform(data, globalData, comp);
21037    this.initHierarchy();
21038}
21039
21040NullElement.prototype.prepareFrame = function(num) {
21041    this.prepareProperties(num, true);
21042};
21043
21044NullElement.prototype.renderFrame = function() {
21045};
21046
21047NullElement.prototype.getBaseElement = function() {
21048	return null;
21049};
21050
21051NullElement.prototype.destroy = function() {
21052};
21053
21054NullElement.prototype.sourceRectAtTime = function() {
21055};
21056
21057NullElement.prototype.hide = function() {
21058};
21059
21060extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement], NullElement);
21061
21062function SVGBaseElement(){
21063}
21064
21065SVGBaseElement.prototype = {
21066    initRendererElement: function() {
21067        this.layerElement = createNS('g');
21068    },
21069    createContainerElements: function(){
21070        this.matteElement = createNS('g');
21071        this.transformedElement = this.layerElement;
21072        this.maskedElement = this.layerElement;
21073        this._sizeChanged = false;
21074        var layerElementParent = null;
21075        //If this layer acts as a mask for the following layer
21076        var filId, fil, gg;
21077        if (this.data.td) {
21078            if (this.data.td == 3 || this.data.td == 1) {
21079                var masker = createNS('mask');
21080                masker.setAttribute('id', this.layerId);
21081                masker.setAttribute('mask-type', this.data.td == 3 ? 'luminance' : 'alpha');
21082                masker.appendChild(this.layerElement);
21083                layerElementParent = masker;
21084                this.globalData.defs.appendChild(masker);
21085                // This is only for IE and Edge when mask if of type alpha
21086                if (!featureSupport.maskType && this.data.td == 1) {
21087                    masker.setAttribute('mask-type', 'luminance');
21088                    filId = createElementID();
21089                    fil = filtersFactory.createFilter(filId);
21090                    this.globalData.defs.appendChild(fil);
21091                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
21092                    gg = createNS('g');
21093                    gg.appendChild(this.layerElement);
21094                    layerElementParent = gg;
21095                    masker.appendChild(gg);
21096                    gg.setAttribute('filter','url(' + locationHref + '#' + filId + ')');
21097                }
21098            } else if(this.data.td == 2) {
21099                var maskGroup = createNS('mask');
21100                maskGroup.setAttribute('id', this.layerId);
21101                maskGroup.setAttribute('mask-type','alpha');
21102                var maskGrouper = createNS('g');
21103                maskGroup.appendChild(maskGrouper);
21104                filId = createElementID();
21105                fil = filtersFactory.createFilter(filId);
21106                ////
21107
21108                // This solution doesn't work on Android when meta tag with viewport attribute is set
21109                /*var feColorMatrix = createNS('feColorMatrix');
21110                feColorMatrix.setAttribute('type', 'matrix');
21111                feColorMatrix.setAttribute('color-interpolation-filters', 'sRGB');
21112                feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 -1 1');
21113                fil.appendChild(feColorMatrix);*/
21114                ////
21115                var feCTr = createNS('feComponentTransfer');
21116                feCTr.setAttribute('in','SourceGraphic');
21117                fil.appendChild(feCTr);
21118                var feFunc = createNS('feFuncA');
21119                feFunc.setAttribute('type','table');
21120                feFunc.setAttribute('tableValues','1.0 0.0');
21121                feCTr.appendChild(feFunc);
21122                ////
21123                this.globalData.defs.appendChild(fil);
21124                var alphaRect = createNS('rect');
21125                alphaRect.setAttribute('width',  this.comp.data.w);
21126                alphaRect.setAttribute('height', this.comp.data.h);
21127                alphaRect.setAttribute('x','0');
21128                alphaRect.setAttribute('y','0');
21129                alphaRect.setAttribute('fill','#ffffff');
21130                alphaRect.setAttribute('opacity','0');
21131                maskGrouper.setAttribute('filter', 'url(' + locationHref + '#'+filId+')');
21132                maskGrouper.appendChild(alphaRect);
21133                maskGrouper.appendChild(this.layerElement);
21134                layerElementParent = maskGrouper;
21135                if (!featureSupport.maskType) {
21136                    maskGroup.setAttribute('mask-type', 'luminance');
21137                    fil.appendChild(filtersFactory.createAlphaToLuminanceFilter());
21138                    gg = createNS('g');
21139                    maskGrouper.appendChild(alphaRect);
21140                    gg.appendChild(this.layerElement);
21141                    layerElementParent = gg;
21142                    maskGrouper.appendChild(gg);
21143                }
21144                this.globalData.defs.appendChild(maskGroup);
21145            }
21146        } else if (this.data.tt) {
21147            this.matteElement.appendChild(this.layerElement);
21148            layerElementParent = this.matteElement;
21149            this.baseElement = this.matteElement;
21150        } else {
21151            this.baseElement = this.layerElement;
21152        }
21153        if (this.data.ln) {
21154            this.layerElement.setAttribute('id', this.data.ln);
21155        }
21156        if (this.data.cl) {
21157            this.layerElement.setAttribute('class', this.data.cl);
21158        }
21159        //Clipping compositions to hide content that exceeds boundaries. If collapsed transformations is on, component should not be clipped
21160        if (this.data.ty === 0 && !this.data.hd) {
21161            var cp = createNS( 'clipPath');
21162            var pt = createNS('path');
21163            pt.setAttribute('d','M0,0 L' + this.data.w + ',0' + ' L' + this.data.w + ',' + this.data.h + ' L0,' + this.data.h + 'z');
21164            var clipId = createElementID();
21165            cp.setAttribute('id',clipId);
21166            cp.appendChild(pt);
21167            this.globalData.defs.appendChild(cp);
21168
21169            if (this.checkMasks()) {
21170                var cpGroup = createNS('g');
21171                cpGroup.setAttribute('clip-path','url(' + locationHref + '#'+clipId + ')');
21172                cpGroup.appendChild(this.layerElement);
21173                this.transformedElement = cpGroup;
21174                if (layerElementParent) {
21175                    layerElementParent.appendChild(this.transformedElement);
21176                } else {
21177                    this.baseElement = this.transformedElement;
21178                }
21179            } else {
21180                this.layerElement.setAttribute('clip-path','url(' + locationHref + '#'+clipId+')');
21181            }
21182            
21183        }
21184        if (this.data.bm !== 0) {
21185            this.setBlendMode();
21186        }
21187
21188    },
21189    renderElement: function() {
21190        if (this.finalTransform._matMdf) {
21191            this.transformedElement.setAttribute('transform', this.finalTransform.mat.to2dCSS());
21192        }
21193        if (this.finalTransform._opMdf) {
21194            this.transformedElement.setAttribute('opacity', this.finalTransform.mProp.o.v);
21195        }
21196    },
21197    destroyBaseElement: function() {
21198        this.layerElement = null;
21199        this.matteElement = null;
21200        this.maskManager.destroy();
21201    },
21202    getBaseElement: function() {
21203        if (this.data.hd) {
21204            return null;
21205        }
21206        return this.baseElement;
21207    },
21208    createRenderableComponents: function() {
21209        this.maskManager = new MaskElement(this.data, this, this.globalData);
21210        this.renderableEffectsManager = new SVGEffects(this);
21211    },
21212    setMatte: function(id) {
21213        if (!this.matteElement) {
21214            return;
21215        }
21216        this.matteElement.setAttribute("mask", "url(" + locationHref + "#" + id + ")");
21217    }
21218};
21219function IShapeElement(){
21220}
21221
21222IShapeElement.prototype = {
21223    addShapeToModifiers: function(data) {
21224        var i, len = this.shapeModifiers.length;
21225        for(i=0;i<len;i+=1){
21226            this.shapeModifiers[i].addShape(data);
21227        }
21228    },
21229    isShapeInAnimatedModifiers: function(data) {
21230        var i = 0, len = this.shapeModifiers.length;
21231        while(i < len) {
21232            if(this.shapeModifiers[i].isAnimatedWithShape(data)) {
21233                return true;
21234            }
21235        }
21236        return false;
21237    },
21238    renderModifiers: function() {
21239        if(!this.shapeModifiers.length){
21240            return;
21241        }
21242        var i, len = this.shapes.length;
21243        for(i=0;i<len;i+=1){
21244            this.shapes[i].sh.reset();
21245        }
21246
21247        len = this.shapeModifiers.length;
21248        for(i=len-1;i>=0;i-=1){
21249            this.shapeModifiers[i].processShapes(this._isFirstFrame);
21250        }
21251    },
21252    lcEnum: {
21253        '1': 'butt',
21254        '2': 'round',
21255        '3': 'square'
21256    },
21257    ljEnum: {
21258        '1': 'miter',
21259        '2': 'round',
21260        '3': 'bevel'
21261    },
21262    searchProcessedElement: function(elem){
21263        var elements = this.processedElements;
21264        var i = 0, len = elements.length;
21265        while (i < len) {
21266            if (elements[i].elem === elem) {
21267                return elements[i].pos;
21268            }
21269            i += 1;
21270        }
21271        return 0;
21272    },
21273    addProcessedElement: function(elem, pos){
21274        var elements = this.processedElements;
21275        var i = elements.length;
21276        while(i) {
21277            i -= 1;
21278            if (elements[i].elem === elem) {
21279                elements[i].pos = pos;
21280                return;
21281            }
21282        }
21283        elements.push(new ProcessedElement(elem, pos));
21284    },
21285    prepareFrame: function(num) {
21286        this.prepareRenderableFrame(num);
21287        this.prepareProperties(num, this.isInRange);
21288    }
21289};
21290function ITextElement(){
21291}
21292
21293ITextElement.prototype.initElement = function(data,globalData,comp){
21294    this.lettersChangedFlag = true;
21295    this.initFrame();
21296    this.initBaseData(data, globalData, comp);
21297    this.textProperty = new TextProperty(this, data.t, this.dynamicProperties);
21298    this.textAnimator = new TextAnimatorProperty(data.t, this.renderType, this);
21299    this.initTransform(data, globalData, comp);
21300    this.initHierarchy();
21301    this.initRenderable();
21302    this.initRendererElement();
21303    this.createContainerElements();
21304    this.createRenderableComponents();
21305    this.createContent();
21306    this.hide();
21307    this.textAnimator.searchProperties(this.dynamicProperties);
21308};
21309
21310ITextElement.prototype.prepareFrame = function(num) {
21311    this._mdf = false;
21312    this.prepareRenderableFrame(num);
21313    this.prepareProperties(num, this.isInRange);
21314    if(this.textProperty._mdf || this.textProperty._isFirstFrame) {
21315        this.buildNewText();
21316        this.textProperty._isFirstFrame = false;
21317        this.textProperty._mdf = false;
21318    }
21319};
21320
21321ITextElement.prototype.createPathShape = function(matrixHelper, shapes) {
21322    var j,jLen = shapes.length;
vendor: 16,951 bytes, lines 21323-21775
21323    var k, kLen, pathNodes;
21324    var shapeStr = '';
21325    for(j=0;j<jLen;j+=1){
21326        pathNodes = shapes[j].ks.k;
21327        shapeStr += buildShapeString(pathNodes, pathNodes.i.length, true, matrixHelper);
21328    }
21329    return shapeStr;
21330};
21331
21332ITextElement.prototype.updateDocumentData = function(newData, index) {
21333    this.textProperty.updateDocumentData(newData, index);
21334};
21335
21336ITextElement.prototype.canResizeFont = function(_canResize) {
21337    this.textProperty.canResizeFont(_canResize);
21338};
21339
21340ITextElement.prototype.setMinimumFontSize = function(_fontSize) {
21341    this.textProperty.setMinimumFontSize(_fontSize);
21342};
21343
21344ITextElement.prototype.applyTextPropertiesToMatrix = function(documentData, matrixHelper, lineNumber, xPos, yPos) {
21345    if(documentData.ps){
21346        matrixHelper.translate(documentData.ps[0],documentData.ps[1] + documentData.ascent,0);
21347    }
21348    matrixHelper.translate(0,-documentData.ls,0);
21349    switch(documentData.j){
21350        case 1:
21351            matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber]),0,0);
21352            break;
21353        case 2:
21354            matrixHelper.translate(documentData.justifyOffset + (documentData.boxWidth - documentData.lineWidths[lineNumber] )/2,0,0);
21355            break;
21356    }
21357    matrixHelper.translate(xPos, yPos, 0);
21358};
21359
21360
21361ITextElement.prototype.buildColor = function(colorData) {
21362    return 'rgb(' + Math.round(colorData[0]*255) + ',' + Math.round(colorData[1]*255) + ',' + Math.round(colorData[2]*255) + ')';
21363};
21364
21365ITextElement.prototype.emptyProp = new LetterProps();
21366
21367ITextElement.prototype.destroy = function(){
21368    
21369};
21370function ICompElement(){}
21371
21372extendPrototype([BaseElement, TransformElement, HierarchyElement, FrameElement, RenderableDOMElement], ICompElement);
21373
21374ICompElement.prototype.initElement = function(data,globalData,comp) {
21375    this.initFrame();
21376    this.initBaseData(data, globalData, comp);
21377    this.initTransform(data, globalData, comp);
21378    this.initRenderable();
21379    this.initHierarchy();
21380    this.initRendererElement();
21381    this.createContainerElements();
21382    this.createRenderableComponents();
21383    if(this.data.xt || !globalData.progressiveLoad){
21384        this.buildAllItems();
21385    }
21386    this.hide();
21387};
21388
21389/*ICompElement.prototype.hide = function(){
21390    if(!this.hidden){
21391        this.hideElement();
21392        var i,len = this.elements.length;
21393        for( i = 0; i < len; i+=1 ){
21394            if(this.elements[i]){
21395                this.elements[i].hide();
21396            }
21397        }
21398    }
21399};*/
21400
21401ICompElement.prototype.prepareFrame = function(num){
21402    this._mdf = false;
21403    this.prepareRenderableFrame(num);
21404    this.prepareProperties(num, this.isInRange);
21405    if(!this.isInRange && !this.data.xt){
21406        return;
21407    }
21408
21409    if (!this.tm._placeholder) {
21410        var timeRemapped = this.tm.v;
21411        if(timeRemapped === this.data.op){
21412            timeRemapped = this.data.op - 1;
21413        }
21414        this.renderedFrame = timeRemapped;
21415    } else {
21416        this.renderedFrame = num/this.data.sr;
21417    }
21418    var i,len = this.elements.length;
21419    if(!this.completeLayers){
21420        this.checkLayers(this.renderedFrame);
21421    }
21422    //This iteration needs to be backwards because of how expressions connect between each other
21423    for( i = len - 1; i >= 0; i -= 1 ){
21424        if(this.completeLayers || this.elements[i]){
21425            this.elements[i].prepareFrame(this.renderedFrame - this.layers[i].st);
21426            if(this.elements[i]._mdf) {
21427                this._mdf = true;
21428            }
21429        }
21430    }
21431};
21432
21433ICompElement.prototype.renderInnerContent = function() {
21434    var i,len = this.layers.length;
21435    for( i = 0; i < len; i += 1 ){
21436        if(this.completeLayers || this.elements[i]){
21437            this.elements[i].renderFrame();
21438        }
21439    }
21440};
21441
21442ICompElement.prototype.setElements = function(elems){
21443    this.elements = elems;
21444};
21445
21446ICompElement.prototype.getElements = function(){
21447    return this.elements;
21448};
21449
21450ICompElement.prototype.destroyElements = function(){
21451    var i,len = this.layers.length;
21452    for( i = 0; i < len; i+=1 ){
21453        if(this.elements[i]){
21454            this.elements[i].destroy();
21455        }
21456    }
21457};
21458
21459ICompElement.prototype.destroy = function(){
21460    this.destroyElements();
21461    this.destroyBaseElement();
21462};
21463
21464function IImageElement(data,globalData,comp){
21465    this.assetData = globalData.getAssetData(data.refId);
21466    this.initElement(data,globalData,comp);
21467    this.sourceRect = {top:0,left:0,width:this.assetData.w,height:this.assetData.h};
21468}
21469
21470extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], IImageElement);
21471
21472IImageElement.prototype.createContent = function(){
21473
21474    var assetPath = this.globalData.getAssetsPath(this.assetData);
21475
21476    this.innerElem = createNS('image');
21477    this.innerElem.setAttribute('width',this.assetData.w+"px");
21478    this.innerElem.setAttribute('height',this.assetData.h+"px");
21479    this.innerElem.setAttribute('preserveAspectRatio',this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio);
21480    this.innerElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
21481    
21482    this.layerElement.appendChild(this.innerElem);
21483};
21484
21485IImageElement.prototype.sourceRectAtTime = function() {
21486	return this.sourceRect;
21487}
21488function ISolidElement(data,globalData,comp){
21489    this.initElement(data,globalData,comp);
21490}
21491extendPrototype([IImageElement], ISolidElement);
21492
21493ISolidElement.prototype.createContent = function(){
21494
21495    var rect = createNS('rect');
21496    ////rect.style.width = this.data.sw;
21497    ////rect.style.height = this.data.sh;
21498    ////rect.style.fill = this.data.sc;
21499    rect.setAttribute('width',this.data.sw);
21500    rect.setAttribute('height',this.data.sh);
21501    rect.setAttribute('fill',this.data.sc);
21502    this.layerElement.appendChild(rect);
21503};
21504function SVGCompElement(data,globalData,comp){
21505    this.layers = data.layers;
21506    this.supports3d = true;
21507    this.completeLayers = false;
21508    this.pendingElements = [];
21509    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
21510    //this.layerElement = createNS('g');
21511    this.initElement(data,globalData,comp);
21512    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this) : {_placeholder:true};
21513}
21514
21515extendPrototype([SVGRenderer, ICompElement, SVGBaseElement], SVGCompElement);
21516function SVGTextElement(data,globalData,comp){
21517    this.textSpans = [];
21518    this.renderType = 'svg';
21519    this.initElement(data,globalData,comp);
21520}
21521
21522extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement], SVGTextElement);
21523
21524SVGTextElement.prototype.createContent = function(){
21525
21526    if (this.data.singleShape && !this.globalData.fontManager.chars) {
21527        this.textContainer = createNS('text');
21528    }
21529};
21530
21531SVGTextElement.prototype.buildTextContents = function(textArray) {
21532    var i = 0, len = textArray.length;
21533    var textContents = [], currentTextContent = '';
21534    while (i < len) {
21535        if(textArray[i] === String.fromCharCode(13) || textArray[i] === String.fromCharCode(3)) {
21536            textContents.push(currentTextContent);
21537            currentTextContent = '';
21538        } else {
21539            currentTextContent += textArray[i];
21540        }
21541        i += 1;
21542    }
21543    textContents.push(currentTextContent);
21544    return textContents;
21545}
21546
21547SVGTextElement.prototype.buildNewText = function(){
21548    var i, len;
21549
21550    var documentData = this.textProperty.currentData;
21551    this.renderedLetters = createSizedArray(documentData ? documentData.l.length : 0);
21552    if(documentData.fc) {
21553        this.layerElement.setAttribute('fill', this.buildColor(documentData.fc));
21554    }else{
21555        this.layerElement.setAttribute('fill', 'rgba(0,0,0,0)');
21556    }
21557    if(documentData.sc){
21558        this.layerElement.setAttribute('stroke', this.buildColor(documentData.sc));
21559        this.layerElement.setAttribute('stroke-width', documentData.sw);
21560    }
21561    this.layerElement.setAttribute('font-size', documentData.finalSize);
21562    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
21563    if(fontData.fClass){
21564        this.layerElement.setAttribute('class',fontData.fClass);
21565    } else {
21566        this.layerElement.setAttribute('font-family', fontData.fFamily);
21567        var fWeight = documentData.fWeight, fStyle = documentData.fStyle;
21568        this.layerElement.setAttribute('font-style', fStyle);
21569        this.layerElement.setAttribute('font-weight', fWeight);
21570    }
21571    this.layerElement.setAttribute('aria-label', documentData.t);
21572
21573    var letters = documentData.l || [];
21574    var usesGlyphs = !!this.globalData.fontManager.chars;
21575    len = letters.length;
21576
21577    var tSpan;
21578    var matrixHelper = this.mHelper;
21579    var shapes, shapeStr = '', singleShape = this.data.singleShape;
21580    var xPos = 0, yPos = 0, firstLine = true;
21581    var trackingOffset = documentData.tr/1000*documentData.finalSize;
21582    if(singleShape && !usesGlyphs && !documentData.sz) {
21583        var tElement = this.textContainer;
21584        var justify = 'start';
21585        switch(documentData.j) {
21586            case 1:
21587                justify = 'end';
21588                break;
21589            case 2:
21590                justify = 'middle';
21591                break;
21592        }
21593        tElement.setAttribute('text-anchor',justify);
21594        tElement.setAttribute('letter-spacing',trackingOffset);
21595        var textContent = this.buildTextContents(documentData.finalText);
21596        len = textContent.length;
21597        yPos = documentData.ps ? documentData.ps[1] + documentData.ascent : 0;
21598        for ( i = 0; i < len; i += 1) {
21599            tSpan = this.textSpans[i] || createNS('tspan');
21600            tSpan.textContent = textContent[i];
21601            tSpan.setAttribute('x', 0);
21602            tSpan.setAttribute('y', yPos);
21603            tSpan.style.display = 'inherit';
21604            tElement.appendChild(tSpan);
21605            this.textSpans[i] = tSpan;
21606            yPos += documentData.finalLineHeight;
21607        }
21608        
21609        this.layerElement.appendChild(tElement);
21610    } else {
21611        var cachedSpansLength = this.textSpans.length;
21612        var shapeData, charData;
21613        for (i = 0; i < len; i += 1) {
21614            if(!usesGlyphs || !singleShape || i === 0){
21615                tSpan = cachedSpansLength > i ? this.textSpans[i] : createNS(usesGlyphs?'path':'text');
21616                if (cachedSpansLength <= i) {
21617                    tSpan.setAttribute('stroke-linecap', 'butt');
21618                    tSpan.setAttribute('stroke-linejoin','round');
21619                    tSpan.setAttribute('stroke-miterlimit','4');
21620                    this.textSpans[i] = tSpan;
21621                    this.layerElement.appendChild(tSpan);
21622                }
21623                tSpan.style.display = 'inherit';
21624            }
21625            
21626            matrixHelper.reset();
21627            matrixHelper.scale(documentData.finalSize / 100, documentData.finalSize / 100);
21628            if (singleShape) {
21629                if(letters[i].n) {
21630                    xPos = -trackingOffset;
21631                    yPos += documentData.yOffset;
21632                    yPos += firstLine ? 1 : 0;
21633                    firstLine = false;
21634                }
21635                this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
21636                xPos += letters[i].l || 0;
21637                //xPos += letters[i].val === ' ' ? 0 : trackingOffset;
21638                xPos += trackingOffset;
21639            }
21640            if(usesGlyphs) {
21641                charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
21642                shapeData = charData && charData.data || {};
21643                shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
21644                if(!singleShape){
21645                    tSpan.setAttribute('d',this.createPathShape(matrixHelper,shapes));
21646                } else {
21647                    shapeStr += this.createPathShape(matrixHelper,shapes);
21648                }
21649            } else {
21650                if(singleShape) {
21651                    tSpan.setAttribute("transform", "translate(" + matrixHelper.props[12] + "," + matrixHelper.props[13] + ")");
21652                }
21653                tSpan.textContent = letters[i].val;
21654                tSpan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space","preserve");
21655            }
21656            //
21657        }
21658        if (singleShape && tSpan) {
21659            tSpan.setAttribute('d',shapeStr);
21660        }
21661    }
21662    while (i < this.textSpans.length){
21663        this.textSpans[i].style.display = 'none';
21664        i += 1;
21665    }
21666    
21667    this._sizeChanged = true;
21668};
21669
21670SVGTextElement.prototype.sourceRectAtTime = function(time){
21671    this.prepareFrame(this.comp.renderedFrame - this.data.st);
21672    this.renderInnerContent();
21673    if(this._sizeChanged){
21674        this._sizeChanged = false;
21675        var textBox = this.layerElement.getBBox();
21676        this.bbox = {
21677            top: textBox.y,
21678            left: textBox.x,
21679            width: textBox.width,
21680            height: textBox.height
21681        };
21682    }
21683    return this.bbox;
21684};
21685
21686SVGTextElement.prototype.renderInnerContent = function(){
21687
21688    if(!this.data.singleShape){
21689        this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
21690        if(this.lettersChangedFlag || this.textAnimator.lettersChangedFlag){
21691            this._sizeChanged = true;
21692            var  i,len;
21693            var renderedLetters = this.textAnimator.renderedLetters;
21694
21695            var letters = this.textProperty.currentData.l;
21696
21697            len = letters.length;
21698            var renderedLetter, textSpan;
21699            for(i=0;i<len;i+=1){
21700                if(letters[i].n){
21701                    continue;
21702                }
21703                renderedLetter = renderedLetters[i];
21704                textSpan = this.textSpans[i];
21705                if(renderedLetter._mdf.m) {
21706                    textSpan.setAttribute('transform',renderedLetter.m);
21707                }
21708                if(renderedLetter._mdf.o) {
21709                    textSpan.setAttribute('opacity',renderedLetter.o);
21710                }
21711                if(renderedLetter._mdf.sw){
21712                    textSpan.setAttribute('stroke-width',renderedLetter.sw);
21713                }
21714                if(renderedLetter._mdf.sc){
21715                    textSpan.setAttribute('stroke',renderedLetter.sc);
21716                }
21717                if(renderedLetter._mdf.fc){
21718                    textSpan.setAttribute('fill',renderedLetter.fc);
21719                }
21720            }
21721        }
21722    }
21723};
21724
21725function SVGShapeElement(data,globalData,comp){
21726    //List of drawable elements
21727    this.shapes = [];
21728    // Full shape data
21729    this.shapesData = data.shapes;
21730    //List of styles that will be applied to shapes
21731    this.stylesList = [];
21732    //List of modifiers that will be applied to shapes
21733    this.shapeModifiers = [];
21734    //List of items in shape tree
21735    this.itemsData = [];
21736    //List of items in previous shape tree
21737    this.processedElements = [];
21738    // List of animated components
21739    this.animatedContents = [];
21740    this.initElement(data,globalData,comp);
21741    //Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
21742    // List of elements that have been created
21743    this.prevViewData = [];
21744    //Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
21745}
21746
21747extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement], SVGShapeElement);
21748
21749SVGShapeElement.prototype.initSecondaryElement = function() {
21750};
21751
21752SVGShapeElement.prototype.identityMatrix = new Matrix();
21753
21754SVGShapeElement.prototype.buildExpressionInterface = function(){};
21755
21756SVGShapeElement.prototype.createContent = function(){
21757    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement, 0, [], true);
21758    this.filterUniqueShapes();
21759};
21760
21761/*
21762This method searches for multiple shapes that affect a single element and one of them is animated
21763*/
21764SVGShapeElement.prototype.filterUniqueShapes = function(){
21765    var i, len = this.shapes.length, shape;
21766    var j, jLen = this.stylesList.length;
21767    var style, count = 0;
21768    var tempShapes = [];
21769    var areAnimated = false;
21770    for(j = 0; j < jLen; j += 1) {
21771        style = this.stylesList[j];
21772        areAnimated = false;
21773        tempShapes.length = 0;
21774        for(i = 0; i < len; i += 1) {
21775            shape = this.shapes[i];
vendor: 30,487 bytes, lines 21776-22446
21776            if(shape.styles.indexOf(style) !== -1) {
21777                tempShapes.push(shape);
21778                areAnimated = shape._isAnimated || areAnimated;
21779            }
21780        }
21781        if(tempShapes.length > 1 && areAnimated) {
21782            this.setShapesAsAnimated(tempShapes);
21783        }
21784    }
21785}
21786
21787SVGShapeElement.prototype.setShapesAsAnimated = function(shapes){
21788    var i, len = shapes.length;
21789    for(i = 0; i < len; i += 1) {
21790        shapes[i].setAsAnimated();
21791    }
21792}
21793
21794SVGShapeElement.prototype.createStyleElement = function(data, level){
21795    //TODO: prevent drawing of hidden styles
21796    var elementData;
21797    var styleOb = new SVGStyleData(data, level);
21798
21799    var pathElement = styleOb.pElem;
21800    if(data.ty === 'st') {
21801        elementData = new SVGStrokeStyleData(this, data, styleOb);
21802    } else if(data.ty === 'fl') {
21803        elementData = new SVGFillStyleData(this, data, styleOb);
21804    } else if(data.ty === 'gf' || data.ty === 'gs') {
21805        var gradientConstructor = data.ty === 'gf' ? SVGGradientFillStyleData : SVGGradientStrokeStyleData;
21806        elementData = new gradientConstructor(this, data, styleOb);
21807        this.globalData.defs.appendChild(elementData.gf);
21808        if (elementData.maskId) {
21809            this.globalData.defs.appendChild(elementData.ms);
21810            this.globalData.defs.appendChild(elementData.of);
21811            pathElement.setAttribute('mask','url(' + locationHref + '#' + elementData.maskId + ')');
21812        }
21813    }
21814    
21815    if(data.ty === 'st' || data.ty === 'gs') {
21816        pathElement.setAttribute('stroke-linecap', this.lcEnum[data.lc] || 'round');
21817        pathElement.setAttribute('stroke-linejoin',this.ljEnum[data.lj] || 'round');
21818        pathElement.setAttribute('fill-opacity','0');
21819        if(data.lj === 1) {
21820            pathElement.setAttribute('stroke-miterlimit',data.ml);
21821        }
21822    }
21823
21824    if(data.r === 2) {
21825        pathElement.setAttribute('fill-rule', 'evenodd');
21826    }
21827
21828    if(data.ln){
21829        pathElement.setAttribute('id',data.ln);
21830    }
21831    if(data.cl){
21832        pathElement.setAttribute('class',data.cl);
21833    }
21834    if(data.bm){
21835        pathElement.style['mix-blend-mode'] = getBlendMode(data.bm);
21836    }
21837    this.stylesList.push(styleOb);
21838    this.addToAnimatedContents(data, elementData);
21839    return elementData;
21840};
21841
21842SVGShapeElement.prototype.createGroupElement = function(data) {
21843    var elementData = new ShapeGroupData();
21844    if(data.ln){
21845        elementData.gr.setAttribute('id',data.ln);
21846    }
21847    if(data.cl){
21848        elementData.gr.setAttribute('class',data.cl);
21849    }
21850    if(data.bm){
21851        elementData.gr.style['mix-blend-mode'] = getBlendMode(data.bm);
21852    }
21853    return elementData;
21854};
21855
21856SVGShapeElement.prototype.createTransformElement = function(data, container) {
21857    var transformProperty = TransformPropertyFactory.getTransformProperty(this,data,this);
21858    var elementData = new SVGTransformData(transformProperty, transformProperty.o, container);
21859    this.addToAnimatedContents(data, elementData);
21860    return elementData;
21861};
21862
21863SVGShapeElement.prototype.createShapeElement = function(data, ownTransformers, level) {
21864    var ty = 4;
21865    if(data.ty === 'rc'){
21866        ty = 5;
21867    }else if(data.ty === 'el'){
21868        ty = 6;
21869    }else if(data.ty === 'sr'){
21870        ty = 7;
21871    }
21872    var shapeProperty = ShapePropertyFactory.getShapeProp(this,data,ty,this);
21873    var elementData = new SVGShapeData(ownTransformers, level, shapeProperty);
21874    this.shapes.push(elementData);
21875    this.addShapeToModifiers(elementData);
21876    this.addToAnimatedContents(data, elementData);
21877    return elementData;
21878};
21879
21880SVGShapeElement.prototype.addToAnimatedContents = function(data, element) {
21881    var i = 0, len = this.animatedContents.length;
21882    while(i < len) {
21883        if(this.animatedContents[i].element === element) {
21884            return;
21885        }
21886        i += 1;
21887    }
21888    this.animatedContents.push({
21889        fn: SVGElementsRenderer.createRenderFunction(data),
21890        element: element,
21891        data: data
21892    });
21893};
21894
21895SVGShapeElement.prototype.setElementStyles = function(elementData){
21896    var arr = elementData.styles;
21897    var j, jLen = this.stylesList.length;
21898    for (j = 0; j < jLen; j += 1) {
21899        if (!this.stylesList[j].closed) {
21900            arr.push(this.stylesList[j]);
21901        }
21902    }
21903};
21904
21905SVGShapeElement.prototype.reloadShapes = function(){
21906    this._isFirstFrame = true;
21907    var i, len = this.itemsData.length;
21908    for( i = 0; i < len; i += 1) {
21909        this.prevViewData[i] = this.itemsData[i];
21910    }
21911    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement, 0, [], true);
21912    this.filterUniqueShapes();
21913    len = this.dynamicProperties.length;
21914    for(i = 0; i < len; i += 1) {
21915        this.dynamicProperties[i].getValue();
21916    }
21917    this.renderModifiers();
21918};
21919
21920SVGShapeElement.prototype.searchShapes = function(arr,itemsData,prevViewData,container, level, transformers, render){
21921    var ownTransformers = [].concat(transformers);
21922    var i, len = arr.length - 1;
21923    var j, jLen;
21924    var ownStyles = [], ownModifiers = [], styleOb, currentTransform, modifier, processedPos;
21925    for(i=len;i>=0;i-=1){
21926        processedPos = this.searchProcessedElement(arr[i]);
21927        if(!processedPos){
21928            arr[i]._render = render;
21929        } else {
21930            itemsData[i] = prevViewData[processedPos - 1];
21931        }
21932        if(arr[i].ty == 'fl' || arr[i].ty == 'st' || arr[i].ty == 'gf' || arr[i].ty == 'gs'){
21933            if(!processedPos){
21934                itemsData[i] = this.createStyleElement(arr[i], level);
21935            } else {
21936                itemsData[i].style.closed = false;
21937            }
21938            if(arr[i]._render){
21939                container.appendChild(itemsData[i].style.pElem);
21940            }
21941            ownStyles.push(itemsData[i].style);
21942        }else if(arr[i].ty == 'gr'){
21943            if(!processedPos){
21944                itemsData[i] = this.createGroupElement(arr[i]);
21945            } else {
21946                jLen = itemsData[i].it.length;
21947                for(j=0;j<jLen;j+=1){
21948                    itemsData[i].prevViewData[j] = itemsData[i].it[j];
21949                }
21950            }
21951            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData,itemsData[i].gr, level + 1, ownTransformers, render);
21952            if(arr[i]._render){
21953                container.appendChild(itemsData[i].gr);
21954            }
21955        }else if(arr[i].ty == 'tr'){
21956            if(!processedPos){
21957                itemsData[i] = this.createTransformElement(arr[i], container);
21958            }
21959            currentTransform = itemsData[i].transform;
21960            ownTransformers.push(currentTransform);
21961        }else if(arr[i].ty == 'sh' || arr[i].ty == 'rc' || arr[i].ty == 'el' || arr[i].ty == 'sr'){
21962            if(!processedPos){
21963                itemsData[i] = this.createShapeElement(arr[i], ownTransformers, level);
21964            }
21965            this.setElementStyles(itemsData[i]);
21966
21967        }else if(arr[i].ty == 'tm' || arr[i].ty == 'rd' || arr[i].ty == 'ms'){
21968            if(!processedPos){
21969                modifier = ShapeModifiers.getModifier(arr[i].ty);
21970                modifier.init(this,arr[i]);
21971                itemsData[i] = modifier;
21972                this.shapeModifiers.push(modifier);
21973            } else {
21974                modifier = itemsData[i];
21975                modifier.closed = false;
21976            }
21977            ownModifiers.push(modifier);
21978        }else if(arr[i].ty == 'rp'){
21979            if(!processedPos){
21980                modifier = ShapeModifiers.getModifier(arr[i].ty);
21981                itemsData[i] = modifier;
21982                modifier.init(this,arr,i,itemsData);
21983                this.shapeModifiers.push(modifier);
21984                render = false;
21985            }else{
21986                modifier = itemsData[i];
21987                modifier.closed = true;
21988            }
21989            ownModifiers.push(modifier);
21990        }
21991        this.addProcessedElement(arr[i], i + 1);
21992    }
21993    len = ownStyles.length;
21994    for(i=0;i<len;i+=1){
21995        ownStyles[i].closed = true;
21996    }
21997    len = ownModifiers.length;
21998    for(i=0;i<len;i+=1){
21999        ownModifiers[i].closed = true;
22000    }
22001};
22002
22003SVGShapeElement.prototype.renderInnerContent = function() {
22004    this.renderModifiers();
22005    var i, len = this.stylesList.length;
22006    for(i=0;i<len;i+=1){
22007        this.stylesList[i].reset();
22008    }
22009    this.renderShape();
22010
22011    for (i = 0; i < len; i += 1) {
22012        if (this.stylesList[i]._mdf || this._isFirstFrame) {
22013            if(this.stylesList[i].msElem){
22014                this.stylesList[i].msElem.setAttribute('d', this.stylesList[i].d);
22015                //Adding M0 0 fixes same mask bug on all browsers
22016                this.stylesList[i].d = 'M0 0' + this.stylesList[i].d;
22017            }
22018            this.stylesList[i].pElem.setAttribute('d', this.stylesList[i].d || 'M0 0');
22019        }
22020    }
22021};
22022
22023SVGShapeElement.prototype.renderShape = function() {
22024    var i, len = this.animatedContents.length;
22025    var animatedContent;
22026    for(i = 0; i < len; i += 1) {
22027        animatedContent = this.animatedContents[i];
22028        if((this._isFirstFrame || animatedContent.element._isAnimated) && animatedContent.data !== true) {
22029            animatedContent.fn(animatedContent.data, animatedContent.element, this._isFirstFrame);
22030        }
22031    }
22032}
22033
22034SVGShapeElement.prototype.destroy = function(){
22035    this.destroyBaseElement();
22036    this.shapesData = null;
22037    this.itemsData = null;
22038};
22039
22040function SVGTintFilter(filter, filterManager){
22041    this.filterManager = filterManager;
22042    var feColorMatrix = createNS('feColorMatrix');
22043    feColorMatrix.setAttribute('type','matrix');
22044    feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
22045    feColorMatrix.setAttribute('values','0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');
22046    feColorMatrix.setAttribute('result','f1');
22047    filter.appendChild(feColorMatrix);
22048    feColorMatrix = createNS('feColorMatrix');
22049    feColorMatrix.setAttribute('type','matrix');
22050    feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
22051    feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
22052    feColorMatrix.setAttribute('result','f2');
22053    filter.appendChild(feColorMatrix);
22054    this.matrixFilter = feColorMatrix;
22055    if(filterManager.effectElements[2].p.v !== 100 || filterManager.effectElements[2].p.k){
22056        var feMerge = createNS('feMerge');
22057        filter.appendChild(feMerge);
22058        var feMergeNode;
22059        feMergeNode = createNS('feMergeNode');
22060        feMergeNode.setAttribute('in','SourceGraphic');
22061        feMerge.appendChild(feMergeNode);
22062        feMergeNode = createNS('feMergeNode');
22063        feMergeNode.setAttribute('in','f2');
22064        feMerge.appendChild(feMergeNode);
22065    }
22066}
22067
22068SVGTintFilter.prototype.renderFrame = function(forceRender){
22069    if(forceRender || this.filterManager._mdf){
22070        var colorBlack = this.filterManager.effectElements[0].p.v;
22071        var colorWhite = this.filterManager.effectElements[1].p.v;
22072        var opacity = this.filterManager.effectElements[2].p.v/100;
22073        this.matrixFilter.setAttribute('values',(colorWhite[0]- colorBlack[0])+' 0 0 0 '+ colorBlack[0] +' '+ (colorWhite[1]- colorBlack[1]) +' 0 0 0 '+ colorBlack[1] +' '+ (colorWhite[2]- colorBlack[2]) +' 0 0 0 '+ colorBlack[2] +' 0 0 0 ' + opacity + ' 0');
22074    }
22075};
22076function SVGFillFilter(filter, filterManager){
22077    this.filterManager = filterManager;
22078    var feColorMatrix = createNS('feColorMatrix');
22079    feColorMatrix.setAttribute('type','matrix');
22080    feColorMatrix.setAttribute('color-interpolation-filters','sRGB');
22081    feColorMatrix.setAttribute('values','1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0');
22082    filter.appendChild(feColorMatrix);
22083    this.matrixFilter = feColorMatrix;
22084}
22085SVGFillFilter.prototype.renderFrame = function(forceRender){
22086    if(forceRender || this.filterManager._mdf){
22087        var color = this.filterManager.effectElements[2].p.v;
22088        var opacity = this.filterManager.effectElements[6].p.v;
22089        this.matrixFilter.setAttribute('values','0 0 0 0 '+color[0]+' 0 0 0 0 '+color[1]+' 0 0 0 0 '+color[2]+' 0 0 0 '+opacity+' 0');
22090    }
22091};
22092function SVGGaussianBlurEffect(filter, filterManager){
22093    // Outset the filter region by 100% on all sides to accommodate blur expansion.
22094    filter.setAttribute('x','-100%');
22095    filter.setAttribute('y','-100%');
22096    filter.setAttribute('width','300%');
22097    filter.setAttribute('height','300%');
22098
22099    this.filterManager = filterManager;
22100    var feGaussianBlur = createNS('feGaussianBlur');
22101    filter.appendChild(feGaussianBlur);
22102    this.feGaussianBlur = feGaussianBlur;
22103}
22104
22105SVGGaussianBlurEffect.prototype.renderFrame = function(forceRender){
22106    if(forceRender || this.filterManager._mdf){
22107        // Empirical value, matching AE's blur appearance.
22108        var kBlurrinessToSigma = 0.3;
22109        var sigma = this.filterManager.effectElements[0].p.v * kBlurrinessToSigma;
22110
22111        // Dimensions mapping:
22112        //
22113        //   1 -> horizontal & vertical
22114        //   2 -> horizontal only
22115        //   3 -> vertical only
22116        //
22117        var dimensions = this.filterManager.effectElements[1].p.v;
22118        var sigmaX = (dimensions == 3) ? 0 : sigma;
22119        var sigmaY = (dimensions == 2) ? 0 : sigma;
22120
22121        this.feGaussianBlur.setAttribute('stdDeviation', sigmaX + " " + sigmaY);
22122
22123        // Repeat edges mapping:
22124        //
22125        //   0 -> off -> duplicate
22126        //   1 -> on  -> wrap
22127        var edgeMode = (this.filterManager.effectElements[2].p.v == 1) ? 'wrap' : 'duplicate';
22128        this.feGaussianBlur.setAttribute('edgeMode', edgeMode);
22129    }
22130}
22131function SVGStrokeEffect(elem, filterManager){
22132    this.initialized = false;
22133    this.filterManager = filterManager;
22134    this.elem = elem;
22135    this.paths = [];
22136}
22137
22138SVGStrokeEffect.prototype.initialize = function(){
22139
22140    var elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
22141    var path,groupPath, i, len;
22142    if(this.filterManager.effectElements[1].p.v === 1){
22143        len = this.elem.maskManager.masksProperties.length;
22144        i = 0;
22145    } else {
22146        i = this.filterManager.effectElements[0].p.v - 1;
22147        len = i + 1;
22148    }
22149    groupPath = createNS('g'); 
22150    groupPath.setAttribute('fill','none');
22151    groupPath.setAttribute('stroke-linecap','round');
22152    groupPath.setAttribute('stroke-dashoffset',1);
22153    for(i;i<len;i+=1){
22154        path = createNS('path');
22155        groupPath.appendChild(path);
22156        this.paths.push({p:path,m:i});
22157    }
22158    if(this.filterManager.effectElements[10].p.v === 3){
22159        var mask = createNS('mask');
22160        var id = createElementID();
22161        mask.setAttribute('id',id);
22162        mask.setAttribute('mask-type','alpha');
22163        mask.appendChild(groupPath);
22164        this.elem.globalData.defs.appendChild(mask);
22165        var g = createNS('g');
22166        g.setAttribute('mask','url(' + locationHref + '#'+id+')');
22167        while (elemChildren[0]) {
22168            g.appendChild(elemChildren[0]);
22169        }
22170        this.elem.layerElement.appendChild(g);
22171        this.masker = mask;
22172        groupPath.setAttribute('stroke','#fff');
22173    } else if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
22174        if(this.filterManager.effectElements[10].p.v === 2){
22175            elemChildren = this.elem.layerElement.children || this.elem.layerElement.childNodes;
22176            while(elemChildren.length){
22177                this.elem.layerElement.removeChild(elemChildren[0]);
22178            }
22179        }
22180        this.elem.layerElement.appendChild(groupPath);
22181        this.elem.layerElement.removeAttribute('mask');
22182        groupPath.setAttribute('stroke','#fff');
22183    }
22184    this.initialized = true;
22185    this.pathMasker = groupPath;
22186};
22187
22188SVGStrokeEffect.prototype.renderFrame = function(forceRender){
22189    if(!this.initialized){
22190        this.initialize();
22191    }
22192    var i, len = this.paths.length;
22193    var mask, path;
22194    for(i=0;i<len;i+=1){
22195        if(this.paths[i].m === -1) {
22196            continue;
22197        }
22198        mask = this.elem.maskManager.viewData[this.paths[i].m];
22199        path = this.paths[i].p;
22200        if(forceRender || this.filterManager._mdf || mask.prop._mdf){
22201            path.setAttribute('d',mask.lastPath);
22202        }
22203        if(forceRender || this.filterManager.effectElements[9].p._mdf || this.filterManager.effectElements[4].p._mdf || this.filterManager.effectElements[7].p._mdf || this.filterManager.effectElements[8].p._mdf || mask.prop._mdf){
22204            var dasharrayValue;
22205            if(this.filterManager.effectElements[7].p.v !== 0 || this.filterManager.effectElements[8].p.v !== 100){
22206                var s = Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
22207                var e = Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v)/100;
22208                var l = path.getTotalLength();
22209                dasharrayValue = '0 0 0 ' + l*s + ' ';
22210                var lineLength = l*(e-s);
22211                var segment = 1+this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
22212                var units = Math.floor(lineLength/segment);
22213                var j;
22214                for(j=0;j<units;j+=1){
22215                    dasharrayValue += '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100 + ' ';
22216                }
22217                dasharrayValue += '0 ' + l*10 + ' 0 0';
22218            } else {
22219                dasharrayValue = '1 ' + this.filterManager.effectElements[4].p.v*2*this.filterManager.effectElements[9].p.v/100;
22220            }
22221            path.setAttribute('stroke-dasharray',dasharrayValue);
22222        }
22223    }
22224    if(forceRender || this.filterManager.effectElements[4].p._mdf){
22225        this.pathMasker.setAttribute('stroke-width',this.filterManager.effectElements[4].p.v*2);
22226    }
22227    
22228    if(forceRender || this.filterManager.effectElements[6].p._mdf){
22229        this.pathMasker.setAttribute('opacity',this.filterManager.effectElements[6].p.v);
22230    }
22231    if(this.filterManager.effectElements[10].p.v === 1 || this.filterManager.effectElements[10].p.v === 2){
22232        if(forceRender || this.filterManager.effectElements[3].p._mdf){
22233            var color = this.filterManager.effectElements[3].p.v;
22234            this.pathMasker.setAttribute('stroke','rgb('+bm_floor(color[0]*255)+','+bm_floor(color[1]*255)+','+bm_floor(color[2]*255)+')');
22235        }
22236    }
22237};
22238function SVGTritoneFilter(filter, filterManager){
22239    this.filterManager = filterManager;
22240    var feColorMatrix = createNS('feColorMatrix');
22241    feColorMatrix.setAttribute('type','matrix');
22242    feColorMatrix.setAttribute('color-interpolation-filters','linearRGB');
22243    feColorMatrix.setAttribute('values','0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0');
22244    feColorMatrix.setAttribute('result','f1');
22245    filter.appendChild(feColorMatrix);
22246    var feComponentTransfer = createNS('feComponentTransfer');
22247    feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
22248    filter.appendChild(feComponentTransfer);
22249    this.matrixFilter = feComponentTransfer;
22250    var feFuncR = createNS('feFuncR');
22251    feFuncR.setAttribute('type','table');
22252    feComponentTransfer.appendChild(feFuncR);
22253    this.feFuncR = feFuncR;
22254    var feFuncG = createNS('feFuncG');
22255    feFuncG.setAttribute('type','table');
22256    feComponentTransfer.appendChild(feFuncG);
22257    this.feFuncG = feFuncG;
22258    var feFuncB = createNS('feFuncB');
22259    feFuncB.setAttribute('type','table');
22260    feComponentTransfer.appendChild(feFuncB);
22261    this.feFuncB = feFuncB;
22262}
22263
22264SVGTritoneFilter.prototype.renderFrame = function(forceRender){
22265    if(forceRender || this.filterManager._mdf){
22266        var color1 = this.filterManager.effectElements[0].p.v;
22267        var color2 = this.filterManager.effectElements[1].p.v;
22268        var color3 = this.filterManager.effectElements[2].p.v;
22269        var tableR = color3[0] + ' ' + color2[0] + ' ' + color1[0];
22270        var tableG = color3[1] + ' ' + color2[1] + ' ' + color1[1];
22271        var tableB = color3[2] + ' ' + color2[2] + ' ' + color1[2];
22272        this.feFuncR.setAttribute('tableValues', tableR);
22273        this.feFuncG.setAttribute('tableValues', tableG);
22274        this.feFuncB.setAttribute('tableValues', tableB);
22275        //var opacity = this.filterManager.effectElements[2].p.v/100;
22276        //this.matrixFilter.setAttribute('values',(colorWhite[0]- colorBlack[0])+' 0 0 0 '+ colorBlack[0] +' '+ (colorWhite[1]- colorBlack[1]) +' 0 0 0 '+ colorBlack[1] +' '+ (colorWhite[2]- colorBlack[2]) +' 0 0 0 '+ colorBlack[2] +' 0 0 0 ' + opacity + ' 0');
22277    }
22278};
22279function SVGProLevelsFilter(filter, filterManager){
22280    this.filterManager = filterManager;
22281    var effectElements = this.filterManager.effectElements;
22282    var feComponentTransfer = createNS('feComponentTransfer');
22283    var feFuncR, feFuncG, feFuncB;
22284    
22285    if(effectElements[10].p.k || effectElements[10].p.v !== 0 || effectElements[11].p.k || effectElements[11].p.v !== 1 || effectElements[12].p.k || effectElements[12].p.v !== 1 || effectElements[13].p.k || effectElements[13].p.v !== 0 || effectElements[14].p.k || effectElements[14].p.v !== 1){
22286        this.feFuncR = this.createFeFunc('feFuncR', feComponentTransfer);
22287    }
22288    if(effectElements[17].p.k || effectElements[17].p.v !== 0 || effectElements[18].p.k || effectElements[18].p.v !== 1 || effectElements[19].p.k || effectElements[19].p.v !== 1 || effectElements[20].p.k || effectElements[20].p.v !== 0 || effectElements[21].p.k || effectElements[21].p.v !== 1){
22289        this.feFuncG = this.createFeFunc('feFuncG', feComponentTransfer);
22290    }
22291    if(effectElements[24].p.k || effectElements[24].p.v !== 0 || effectElements[25].p.k || effectElements[25].p.v !== 1 || effectElements[26].p.k || effectElements[26].p.v !== 1 || effectElements[27].p.k || effectElements[27].p.v !== 0 || effectElements[28].p.k || effectElements[28].p.v !== 1){
22292        this.feFuncB = this.createFeFunc('feFuncB', feComponentTransfer);
22293    }
22294    if(effectElements[31].p.k || effectElements[31].p.v !== 0 || effectElements[32].p.k || effectElements[32].p.v !== 1 || effectElements[33].p.k || effectElements[33].p.v !== 1 || effectElements[34].p.k || effectElements[34].p.v !== 0 || effectElements[35].p.k || effectElements[35].p.v !== 1){
22295        this.feFuncA = this.createFeFunc('feFuncA', feComponentTransfer);
22296    }
22297    
22298    if(this.feFuncR || this.feFuncG || this.feFuncB || this.feFuncA){
22299        feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
22300        filter.appendChild(feComponentTransfer);
22301        feComponentTransfer = createNS('feComponentTransfer');
22302    }
22303
22304    if(effectElements[3].p.k || effectElements[3].p.v !== 0 || effectElements[4].p.k || effectElements[4].p.v !== 1 || effectElements[5].p.k || effectElements[5].p.v !== 1 || effectElements[6].p.k || effectElements[6].p.v !== 0 || effectElements[7].p.k || effectElements[7].p.v !== 1){
22305
22306        feComponentTransfer.setAttribute('color-interpolation-filters','sRGB');
22307        filter.appendChild(feComponentTransfer);
22308        this.feFuncRComposed = this.createFeFunc('feFuncR', feComponentTransfer);
22309        this.feFuncGComposed = this.createFeFunc('feFuncG', feComponentTransfer);
22310        this.feFuncBComposed = this.createFeFunc('feFuncB', feComponentTransfer);
22311    }
22312}
22313
22314SVGProLevelsFilter.prototype.createFeFunc = function(type, feComponentTransfer) {
22315    var feFunc = createNS(type);
22316    feFunc.setAttribute('type','table');
22317    feComponentTransfer.appendChild(feFunc);
22318    return feFunc;
22319};
22320
22321SVGProLevelsFilter.prototype.getTableValue = function(inputBlack, inputWhite, gamma, outputBlack, outputWhite) {
22322    var cnt = 0;
22323    var segments = 256;
22324    var perc;
22325    var min = Math.min(inputBlack, inputWhite);
22326    var max = Math.max(inputBlack, inputWhite);
22327    var table = Array.call(null,{length:segments});
22328    var colorValue;
22329    var pos = 0;
22330    var outputDelta = outputWhite - outputBlack; 
22331    var inputDelta = inputWhite - inputBlack; 
22332    while(cnt <= 256) {
22333        perc = cnt/256;
22334        if(perc <= min){
22335            colorValue = inputDelta < 0 ? outputWhite : outputBlack;
22336        } else if(perc >= max){
22337            colorValue = inputDelta < 0 ? outputBlack : outputWhite;
22338        } else {
22339            colorValue = (outputBlack + outputDelta * Math.pow((perc - inputBlack) / inputDelta, 1 / gamma));
22340        }
22341        table[pos++] = colorValue;
22342        cnt += 256/(segments-1);
22343    }
22344    return table.join(' ');
22345};
22346
22347SVGProLevelsFilter.prototype.renderFrame = function(forceRender){
22348    if(forceRender || this.filterManager._mdf){
22349        var val, cnt, perc, bezier;
22350        var effectElements = this.filterManager.effectElements;
22351        if(this.feFuncRComposed && (forceRender || effectElements[3].p._mdf || effectElements[4].p._mdf || effectElements[5].p._mdf || effectElements[6].p._mdf || effectElements[7].p._mdf)){
22352            val = this.getTableValue(effectElements[3].p.v,effectElements[4].p.v,effectElements[5].p.v,effectElements[6].p.v,effectElements[7].p.v);
22353            this.feFuncRComposed.setAttribute('tableValues',val);
22354            this.feFuncGComposed.setAttribute('tableValues',val);
22355            this.feFuncBComposed.setAttribute('tableValues',val);
22356        }
22357
22358
22359        if(this.feFuncR && (forceRender || effectElements[10].p._mdf || effectElements[11].p._mdf || effectElements[12].p._mdf || effectElements[13].p._mdf || effectElements[14].p._mdf)){
22360            val = this.getTableValue(effectElements[10].p.v,effectElements[11].p.v,effectElements[12].p.v,effectElements[13].p.v,effectElements[14].p.v);
22361            this.feFuncR.setAttribute('tableValues',val);
22362        }
22363
22364        if(this.feFuncG && (forceRender || effectElements[17].p._mdf || effectElements[18].p._mdf || effectElements[19].p._mdf || effectElements[20].p._mdf || effectElements[21].p._mdf)){
22365            val = this.getTableValue(effectElements[17].p.v,effectElements[18].p.v,effectElements[19].p.v,effectElements[20].p.v,effectElements[21].p.v);
22366            this.feFuncG.setAttribute('tableValues',val);
22367        }
22368
22369        if(this.feFuncB && (forceRender || effectElements[24].p._mdf || effectElements[25].p._mdf || effectElements[26].p._mdf || effectElements[27].p._mdf || effectElements[28].p._mdf)){
22370            val = this.getTableValue(effectElements[24].p.v,effectElements[25].p.v,effectElements[26].p.v,effectElements[27].p.v,effectElements[28].p.v);
22371            this.feFuncB.setAttribute('tableValues',val);
22372        }
22373
22374        if(this.feFuncA && (forceRender || effectElements[31].p._mdf || effectElements[32].p._mdf || effectElements[33].p._mdf || effectElements[34].p._mdf || effectElements[35].p._mdf)){
22375            val = this.getTableValue(effectElements[31].p.v,effectElements[32].p.v,effectElements[33].p.v,effectElements[34].p.v,effectElements[35].p.v);
22376            this.feFuncA.setAttribute('tableValues',val);
22377        }
22378        
22379    }
22380};
22381function SVGDropShadowEffect(filter, filterManager){
22382    filter.setAttribute('x','-100%');
22383    filter.setAttribute('y','-100%');
22384    filter.setAttribute('width','400%');
22385    filter.setAttribute('height','400%');
22386    this.filterManager = filterManager;
22387
22388    var feGaussianBlur = createNS('feGaussianBlur');
22389    feGaussianBlur.setAttribute('in','SourceAlpha');
22390    feGaussianBlur.setAttribute('result','drop_shadow_1');
22391    feGaussianBlur.setAttribute('stdDeviation','0');
22392    this.feGaussianBlur = feGaussianBlur;
22393    filter.appendChild(feGaussianBlur);
22394
22395    var feOffset = createNS('feOffset');
22396    feOffset.setAttribute('dx','25');
22397    feOffset.setAttribute('dy','0');
22398    feOffset.setAttribute('in','drop_shadow_1');
22399    feOffset.setAttribute('result','drop_shadow_2');
22400    this.feOffset = feOffset;
22401    filter.appendChild(feOffset);
22402    var feFlood = createNS('feFlood');
22403    feFlood.setAttribute('flood-color','#00ff00');
22404    feFlood.setAttribute('flood-opacity','1');
22405    feFlood.setAttribute('result','drop_shadow_3');
22406    this.feFlood = feFlood;
22407    filter.appendChild(feFlood);
22408
22409    var feComposite = createNS('feComposite');
22410    feComposite.setAttribute('in','drop_shadow_3');
22411    feComposite.setAttribute('in2','drop_shadow_2');
22412    feComposite.setAttribute('operator','in');
22413    feComposite.setAttribute('result','drop_shadow_4');
22414    filter.appendChild(feComposite);
22415
22416
22417    var feMerge = createNS('feMerge');
22418    filter.appendChild(feMerge);
22419    var feMergeNode;
22420    feMergeNode = createNS('feMergeNode');
22421    feMerge.appendChild(feMergeNode);
22422    feMergeNode = createNS('feMergeNode');
22423    feMergeNode.setAttribute('in','SourceGraphic');
22424    this.feMergeNode = feMergeNode;
22425    this.feMerge = feMerge;
22426    this.originalNodeAdded = false;
22427    feMerge.appendChild(feMergeNode);
22428}
22429
22430SVGDropShadowEffect.prototype.renderFrame = function(forceRender){
22431    if(forceRender || this.filterManager._mdf){
22432        if(forceRender || this.filterManager.effectElements[4].p._mdf){
22433            this.feGaussianBlur.setAttribute('stdDeviation', this.filterManager.effectElements[4].p.v / 4);
22434        }
22435        if(forceRender || this.filterManager.effectElements[0].p._mdf){
22436            var col = this.filterManager.effectElements[0].p.v;
22437            this.feFlood.setAttribute('flood-color',rgbToHex(Math.round(col[0]*255),Math.round(col[1]*255),Math.round(col[2]*255)));
22438        }
22439        if(forceRender || this.filterManager.effectElements[1].p._mdf){
22440            this.feFlood.setAttribute('flood-opacity',this.filterManager.effectElements[1].p.v/255);
22441        }
22442        if(forceRender || this.filterManager.effectElements[2].p._mdf || this.filterManager.effectElements[3].p._mdf){
22443            var distance = this.filterManager.effectElements[3].p.v;
22444            var angle = (this.filterManager.effectElements[2].p.v - 90) * degToRads;
22445            var x = distance * Math.cos(angle);
22446            var y = distance * Math.sin(angle);
22447            this.feOffset.setAttribute('dx', x);
22448            this.feOffset.setAttribute('dy', y);
22449        }
22450        /*if(forceRender || this.filterManager.effectElements[5].p._mdf){
22451            if(this.filterManager.effectElements[5].p.v === 1 && this.originalNodeAdded) {
22452                this.feMerge.removeChild(this.feMergeNode);
22453                this.originalNodeAdded = false;
22454            } else if(this.filterManager.effectElements[5].p.v === 0 && !this.originalNodeAdded) {
22455                this.feMerge.appendChild(this.feMergeNode);
22456                this.originalNodeAdded = true;
22457            }
22458        }*/
22459    }
22460};
22461var _svgMatteSymbols = [];
22462
22463function SVGMatte3Effect(filterElem, filterManager, elem){
22464    this.initialized = false;
22465    this.filterManager = filterManager;
22466    this.filterElem = filterElem;
22467    this.elem = elem;
22468    elem.matteElement = createNS('g');
22469    elem.matteElement.appendChild(elem.layerElement);
22470    elem.matteElement.appendChild(elem.transformedElement);
22471    elem.baseElement = elem.matteElement;
22472}
22473
22474SVGMatte3Effect.prototype.findSymbol = function(mask) {
22475    var i = 0, len = _svgMatteSymbols.length;
22476    while(i < len) {
22477        if(_svgMatteSymbols[i] === mask) {
22478            return _svgMatteSymbols[i];
22479        }
22480        i += 1;
22481    }
22482    return null;
22483};
22484
22485SVGMatte3Effect.prototype.replaceInParent = function(mask, symbolId) {
22486    var parentNode = mask.layerElement.parentNode;
22487    if(!parentNode) {
22488        return;
22489    }
22490    var children = parentNode.children;
22491    var i = 0, len = children.length;
22492    while (i < len) {
22493        if (children[i] === mask.layerElement) {
22494            break;
22495        }
22496        i += 1;
22497    }
22498    var nextChild;
22499    if (i <= len - 2) {
22500        nextChild = children[i + 1];
22501    }
22502    var useElem = createNS('use');
22503    useElem.setAttribute('href', '#' + symbolId);
22504    if(nextChild) {
22505        parentNode.insertBefore(useElem, nextChild);
22506    } else {
22507        parentNode.appendChild(useElem);
22508    }
22509};
22510
22511SVGMatte3Effect.prototype.setElementAsMask = function(elem, mask) {
22512    if(!this.findSymbol(mask)) {
22513        var symbolId = createElementID();
22514        var masker = createNS('mask');
22515        masker.setAttribute('id', mask.layerId);
22516        masker.setAttribute('mask-type', 'alpha');
22517        _svgMatteSymbols.push(mask);
22518        var defs = elem.globalData.defs;
22519        defs.appendChild(masker);
22520        var symbol = createNS('symbol');
22521        symbol.setAttribute('id', symbolId);
22522        this.replaceInParent(mask, symbolId);
22523        symbol.appendChild(mask.layerElement);
22524        defs.appendChild(symbol);
22525        var useElem = createNS('use');
22526        useElem.setAttribute('href', '#' + symbolId);
22527        masker.appendChild(useElem);
22528        mask.data.hd = false;
22529        mask.show();
22530    }
22531    elem.setMatte(mask.layerId);
22532};
22533
22534SVGMatte3Effect.prototype.initialize = function() {
22535    var ind = this.filterManager.effectElements[0].p.v;
22536    var elements = this.elem.comp.elements;
22537    var i = 0, len = elements.length;
22538    while (i < len) {
22539    	if (elements[i] && elements[i].data.ind === ind) {
22540    		this.setElementAsMask(this.elem, elements[i]);
22541    	}
22542    	i += 1;
22543    }
22544    this.initialized = true;
22545};
22546
22547SVGMatte3Effect.prototype.renderFrame = function() {
22548	if(!this.initialized) {
22549		this.initialize();
22550	}
22551};
22552function SVGEffects(elem){
22553    var i, len = elem.data.ef ? elem.data.ef.length : 0;
22554    var filId = createElementID();
22555    var fil = filtersFactory.createFilter(filId);
22556    var count = 0;
22557    this.filters = [];
22558    var filterManager;
22559    for(i=0;i<len;i+=1){
22560        filterManager = null;
22561        if(elem.data.ef[i].ty === 20){
22562            count += 1;
22563            filterManager = new SVGTintFilter(fil, elem.effectsManager.effectElements[i]);
22564        }else if(elem.data.ef[i].ty === 21){
22565            count += 1;
22566            filterManager = new SVGFillFilter(fil, elem.effectsManager.effectElements[i]);
22567        }else if(elem.data.ef[i].ty === 22){
22568            filterManager = new SVGStrokeEffect(elem, elem.effectsManager.effectElements[i]);
22569        }else if(elem.data.ef[i].ty === 23){
22570            count += 1;
22571            filterManager = new SVGTritoneFilter(fil, elem.effectsManager.effectElements[i]);
22572        }else if(elem.data.ef[i].ty === 24){
22573            count += 1;
22574            filterManager = new SVGProLevelsFilter(fil, elem.effectsManager.effectElements[i]);
22575        }else if(elem.data.ef[i].ty === 25){
22576            count += 1;
22577            filterManager = new SVGDropShadowEffect(fil, elem.effectsManager.effectElements[i]);
22578        }else if(elem.data.ef[i].ty === 28){
22579            //count += 1;
22580            filterManager = new SVGMatte3Effect(fil, elem.effectsManager.effectElements[i], elem);
22581        }else if(elem.data.ef[i].ty === 29){
22582            count += 1;
22583            filterManager = new SVGGaussianBlurEffect(fil, elem.effectsManager.effectElements[i]);
22584        }
22585        if(filterManager) {
22586            this.filters.push(filterManager);
22587        }
22588    }
22589    if(count){
22590        elem.globalData.defs.appendChild(fil);
22591        elem.layerElement.setAttribute('filter','url(' + locationHref + '#'+filId+')');
22592    }
22593    if (this.filters.length) {
22594        elem.addRenderableComponent(this);
22595    }
22596}
22597
22598SVGEffects.prototype.renderFrame = function(_isFirstFrame){
22599    var i, len = this.filters.length;
22600    for(i=0;i<len;i+=1){
22601        this.filters[i].renderFrame(_isFirstFrame);
22602    }
22603};
22604function CVContextData() {
22605	this.saved = [];
22606    this.cArrPos = 0;
22607    this.cTr = new Matrix();
22608    this.cO = 1;
22609    var i, len = 15;
22610    this.savedOp = createTypedArray('float32', len);
22611    for(i=0;i<len;i+=1){
22612        this.saved[i] = createTypedArray('float32', 16);
22613    }
22614    this._length = len;
22615}
22616
22617CVContextData.prototype.duplicate = function() {
22618	var newLength = this._length * 2;
22619	var currentSavedOp = this.savedOp;
22620    this.savedOp = createTypedArray('float32', newLength);
22621    this.savedOp.set(currentSavedOp);
vendor: 16,384 bytes, lines 22622-23065
22622    var i = 0;
22623    for(i = this._length; i < newLength; i += 1) {
22624        this.saved[i] = createTypedArray('float32', 16);
22625    }
22626    this._length = newLength;
22627};
22628
22629CVContextData.prototype.reset = function() {
22630	this.cArrPos = 0;
22631	this.cTr.reset();
22632    this.cO = 1;
22633};
22634function CVBaseElement(){
22635}
22636
22637CVBaseElement.prototype = {
22638    createElements: function(){},
22639    initRendererElement: function(){},
22640    createContainerElements: function(){
22641        this.canvasContext = this.globalData.canvasContext;
22642        this.renderableEffectsManager = new CVEffects(this);
22643    },
22644    createContent: function(){},
22645    setBlendMode: function(){
22646        var globalData = this.globalData;
22647        if(globalData.blendMode !== this.data.bm) {
22648            globalData.blendMode = this.data.bm;
22649            var blendModeValue = getBlendMode(this.data.bm);
22650            globalData.canvasContext.globalCompositeOperation = blendModeValue;
22651        }
22652    },
22653    createRenderableComponents: function(){
22654        this.maskManager = new CVMaskElement(this.data, this);
22655    },
22656    hideElement: function(){
22657        if (!this.hidden && (!this.isInRange || this.isTransparent)) {
22658            this.hidden = true;
22659        }
22660    },
22661    showElement: function(){
22662        if (this.isInRange && !this.isTransparent){
22663            this.hidden = false;
22664            this._isFirstFrame = true;
22665            this.maskManager._isFirstFrame = true;
22666        }
22667    },
22668    renderFrame: function() {
22669        if (this.hidden || this.data.hd) {
22670            return;
22671        }
22672        this.renderTransform();
22673        this.renderRenderable();
22674        this.setBlendMode();
22675        var forceRealStack = this.data.ty === 0;
22676        this.globalData.renderer.save(forceRealStack);
22677        this.globalData.renderer.ctxTransform(this.finalTransform.mat.props);
22678        this.globalData.renderer.ctxOpacity(this.finalTransform.mProp.o.v);
22679        this.renderInnerContent();
22680        this.globalData.renderer.restore(forceRealStack);
22681        if(this.maskManager.hasMasks) {
22682            this.globalData.renderer.restore(true);
22683        }
22684        if (this._isFirstFrame) {
22685            this._isFirstFrame = false;
22686        }
22687    },
22688    destroy: function(){
22689        this.canvasContext = null;
22690        this.data = null;
22691        this.globalData = null;
22692        this.maskManager.destroy();
22693    },
22694    mHelper: new Matrix()
22695};
22696CVBaseElement.prototype.hide = CVBaseElement.prototype.hideElement;
22697CVBaseElement.prototype.show = CVBaseElement.prototype.showElement;
22698
22699function CVImageElement(data, globalData, comp){
22700    this.assetData = globalData.getAssetData(data.refId);
22701    this.img = globalData.imageLoader.getImage(this.assetData);
22702    this.initElement(data,globalData,comp);
22703}
22704extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVImageElement);
22705
22706CVImageElement.prototype.initElement = SVGShapeElement.prototype.initElement;
22707CVImageElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
22708
22709CVImageElement.prototype.createContent = function(){
22710
22711    if (this.img.width && (this.assetData.w !== this.img.width || this.assetData.h !== this.img.height)) {
22712        var canvas = createTag('canvas');
22713        canvas.width = this.assetData.w;
22714        canvas.height = this.assetData.h;
22715        var ctx = canvas.getContext('2d');
22716
22717        var imgW = this.img.width;
22718        var imgH = this.img.height;
22719        var imgRel = imgW / imgH;
22720        var canvasRel = this.assetData.w/this.assetData.h;
22721        var widthCrop, heightCrop;
22722        var par = this.assetData.pr || this.globalData.renderConfig.imagePreserveAspectRatio;
22723        if((imgRel > canvasRel && par === 'xMidYMid slice') || (imgRel < canvasRel && par !== 'xMidYMid slice')) {
22724            heightCrop = imgH;
22725            widthCrop = heightCrop*canvasRel;
22726        } else {
22727            widthCrop = imgW;
22728            heightCrop = widthCrop/canvasRel;
22729        }
22730        ctx.drawImage(this.img,(imgW-widthCrop)/2,(imgH-heightCrop)/2,widthCrop,heightCrop,0,0,this.assetData.w,this.assetData.h);
22731        this.img = canvas;
22732    }
22733
22734};
22735
22736CVImageElement.prototype.renderInnerContent = function(parentMatrix){
22737    this.canvasContext.drawImage(this.img, 0, 0);
22738};
22739
22740CVImageElement.prototype.destroy = function(){
22741    this.img = null;
22742};
22743function CVCompElement(data, globalData, comp) {
22744    this.completeLayers = false;
22745    this.layers = data.layers;
22746    this.pendingElements = [];
22747    this.elements = createSizedArray(this.layers.length);
22748    this.initElement(data, globalData, comp);
22749    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate, this) : {_placeholder:true};
22750}
22751
22752extendPrototype([CanvasRenderer, ICompElement, CVBaseElement], CVCompElement);
22753
22754CVCompElement.prototype.renderInnerContent = function() {
22755    var ctx = this.canvasContext;
22756    ctx.beginPath();
22757    ctx.moveTo(0, 0);
22758    ctx.lineTo(this.data.w, 0);
22759    ctx.lineTo(this.data.w, this.data.h);
22760    ctx.lineTo(0, this.data.h);
22761    ctx.lineTo(0, 0);
22762    ctx.clip();
22763    var i,len = this.layers.length;
22764    for( i = len - 1; i >= 0; i -= 1 ){
22765        if(this.completeLayers || this.elements[i]){
22766            this.elements[i].renderFrame();
22767        }
22768    }
22769};
22770
22771CVCompElement.prototype.destroy = function(){
22772    var i,len = this.layers.length;
22773    for( i = len - 1; i >= 0; i -= 1 ){
22774        if(this.elements[i]) {
22775            this.elements[i].destroy();
22776        }
22777    }
22778    this.layers = null;
22779    this.elements = null;
22780};
22781
22782function CVMaskElement(data,element){
22783    this.data = data;
22784    this.element = element;
22785    this.masksProperties = this.data.masksProperties || [];
22786    this.viewData = createSizedArray(this.masksProperties.length);
22787    var i, len = this.masksProperties.length, hasMasks = false;
22788    for (i = 0; i < len; i++) {
22789        if(this.masksProperties[i].mode !== 'n'){
22790            hasMasks = true;
22791        }
22792        this.viewData[i] = ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);
22793    }
22794    this.hasMasks = hasMasks;
22795    if(hasMasks) {
22796        this.element.addRenderableComponent(this);
22797    }
22798}
22799
22800CVMaskElement.prototype.renderFrame = function () {
22801    if(!this.hasMasks){
22802        return;
22803    }
22804    var transform = this.element.finalTransform.mat;
22805    var ctx = this.element.canvasContext;
22806    var i, len = this.masksProperties.length;
22807    var pt,pts,data;
22808    ctx.beginPath();
22809    for (i = 0; i < len; i++) {
22810        if(this.masksProperties[i].mode !== 'n'){
22811            if (this.masksProperties[i].inv) {
22812                ctx.moveTo(0, 0);
22813                ctx.lineTo(this.element.globalData.compSize.w, 0);
22814                ctx.lineTo(this.element.globalData.compSize.w, this.element.globalData.compSize.h);
22815                ctx.lineTo(0, this.element.globalData.compSize.h);
22816                ctx.lineTo(0, 0);
22817            }
22818            data = this.viewData[i].v;
22819            pt = transform.applyToPointArray(data.v[0][0],data.v[0][1],0);
22820            ctx.moveTo(pt[0], pt[1]);
22821            var j, jLen = data._length;
22822            for (j = 1; j < jLen; j++) {
22823                pts = transform.applyToTriplePoints(data.o[j - 1], data.i[j], data.v[j]);
22824                ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
22825            }
22826            pts = transform.applyToTriplePoints(data.o[j - 1], data.i[0], data.v[0]);
22827            ctx.bezierCurveTo(pts[0], pts[1], pts[2], pts[3], pts[4], pts[5]);
22828        }
22829    }
22830    this.element.globalData.renderer.save(true);
22831    ctx.clip();
22832};
22833
22834CVMaskElement.prototype.getMaskProperty = MaskElement.prototype.getMaskProperty;
22835
22836CVMaskElement.prototype.destroy = function(){
22837    this.element = null;
22838};
22839function CVShapeElement(data, globalData, comp) {
22840    this.shapes = [];
22841    this.shapesData = data.shapes;
22842    this.stylesList = [];
22843    this.itemsData = [];
22844    this.prevViewData = [];
22845    this.shapeModifiers = [];
22846    this.processedElements = [];
22847    this.transformsManager = new ShapeTransformManager();
22848    this.initElement(data, globalData, comp);
22849}
22850
22851extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement], CVShapeElement);
22852
22853CVShapeElement.prototype.initElement = RenderableDOMElement.prototype.initElement;
22854
22855CVShapeElement.prototype.transformHelper = {opacity:1,_opMdf:false};
22856
22857CVShapeElement.prototype.dashResetter = [];
22858
22859CVShapeElement.prototype.createContent = function(){
22860    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData, true, []);
22861};
22862
22863CVShapeElement.prototype.createStyleElement = function(data, transforms) {
22864    var styleElem = {
22865        data: data,
22866        type: data.ty,
22867        preTransforms: this.transformsManager.addTransformSequence(transforms),
22868        transforms: [],
22869        elements: [],
22870        closed: data.hd === true
22871    };
22872    var elementData = {};
22873    if(data.ty == 'fl' || data.ty == 'st'){
22874        elementData.c = PropertyFactory.getProp(this,data.c,1,255,this);
22875        if(!elementData.c.k){
22876            styleElem.co = 'rgb('+bm_floor(elementData.c.v[0])+','+bm_floor(elementData.c.v[1])+','+bm_floor(elementData.c.v[2])+')';
22877        }
22878    } else if (data.ty === 'gf' || data.ty === 'gs') {
22879        elementData.s = PropertyFactory.getProp(this,data.s,1,null,this);
22880        elementData.e = PropertyFactory.getProp(this,data.e,1,null,this);
22881        elementData.h = PropertyFactory.getProp(this,data.h||{k:0},0,0.01,this);
22882        elementData.a = PropertyFactory.getProp(this,data.a||{k:0},0,degToRads,this);
22883        elementData.g = new GradientProperty(this,data.g,this);
22884    }
22885    elementData.o = PropertyFactory.getProp(this,data.o,0,0.01,this);
22886    if(data.ty == 'st' || data.ty == 'gs') {
22887        styleElem.lc = this.lcEnum[data.lc] || 'round';
22888        styleElem.lj = this.ljEnum[data.lj] || 'round';
22889        if(data.lj == 1) {
22890            styleElem.ml = data.ml;
22891        }
22892        elementData.w = PropertyFactory.getProp(this,data.w,0,null,this);
22893        if(!elementData.w.k){
22894            styleElem.wi = elementData.w.v;
22895        }
22896        if(data.d){
22897            var d = new DashProperty(this,data.d,'canvas', this);
22898            elementData.d = d;
22899            if(!elementData.d.k){
22900                styleElem.da = elementData.d.dashArray;
22901                styleElem.do = elementData.d.dashoffset[0];
22902            }
22903        }
22904    } else {
22905        styleElem.r = data.r === 2 ? 'evenodd' : 'nonzero';
22906    }
22907    this.stylesList.push(styleElem);
22908    elementData.style = styleElem;
22909    return elementData;
22910};
22911
22912CVShapeElement.prototype.createGroupElement = function(data) {
22913    var elementData = {
22914        it: [],
22915        prevViewData: []
22916    };
22917    return elementData;
22918};
22919
22920CVShapeElement.prototype.createTransformElement = function(data) {
22921    var elementData = {
22922        transform : {
22923            opacity: 1,
22924            _opMdf:false,
22925            key: this.transformsManager.getNewKey(),
22926            op: PropertyFactory.getProp(this,data.o,0,0.01,this),
22927            mProps: TransformPropertyFactory.getTransformProperty(this,data,this)
22928        }
22929    };
22930    return elementData;
22931};
22932
22933CVShapeElement.prototype.createShapeElement = function(data) {
22934    var elementData = new CVShapeData(this, data, this.stylesList, this.transformsManager);
22935    
22936    this.shapes.push(elementData);
22937    this.addShapeToModifiers(elementData);
22938    return elementData;
22939};
22940
22941CVShapeElement.prototype.reloadShapes = function() {
22942    this._isFirstFrame = true;
22943    var i, len = this.itemsData.length;
22944    for (i = 0; i < len; i += 1) {
22945        this.prevViewData[i] = this.itemsData[i];
22946    }
22947    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData, true, []);
22948    len = this.dynamicProperties.length;
22949    for (i = 0; i < len; i += 1) {
22950        this.dynamicProperties[i].getValue();
22951    }
22952    this.renderModifiers();
22953    this.transformsManager.processSequences(this._isFirstFrame);
22954};
22955
22956CVShapeElement.prototype.addTransformToStyleList = function(transform) {
22957    var i, len = this.stylesList.length;
22958    for (i = 0; i < len; i += 1) {
22959        if(!this.stylesList[i].closed) {
22960            this.stylesList[i].transforms.push(transform);
22961        }
22962    }
22963}
22964
22965CVShapeElement.prototype.removeTransformFromStyleList = function() {
22966    var i, len = this.stylesList.length;
22967    for (i = 0; i < len; i += 1) {
22968        if(!this.stylesList[i].closed) {
22969            this.stylesList[i].transforms.pop();
22970        }
22971    }
22972}
22973
22974CVShapeElement.prototype.closeStyles = function(styles) {
22975    var i, len = styles.length, j, jLen;
22976    for (i = 0; i < len; i += 1) {
22977        styles[i].closed = true;
22978    }
22979}
22980
22981CVShapeElement.prototype.searchShapes = function(arr,itemsData, prevViewData, shouldRender, transforms){
22982    var i, len = arr.length - 1;
22983    var j, jLen;
22984    var ownStyles = [], ownModifiers = [], processedPos, modifier, currentTransform;
22985    var ownTransforms = [].concat(transforms);
22986    for(i=len;i>=0;i-=1){
22987        processedPos = this.searchProcessedElement(arr[i]);
22988        if(!processedPos){
22989            arr[i]._shouldRender = shouldRender;
22990        } else {
22991            itemsData[i] = prevViewData[processedPos - 1];
22992        }
22993        if(arr[i].ty == 'fl' || arr[i].ty == 'st'|| arr[i].ty == 'gf'|| arr[i].ty == 'gs'){
22994            if(!processedPos){
22995                itemsData[i] = this.createStyleElement(arr[i], ownTransforms);
22996            } else {
22997                itemsData[i].style.closed = false;
22998            }
22999            
23000            ownStyles.push(itemsData[i].style);
23001        }else if(arr[i].ty == 'gr'){
23002            if(!processedPos){
23003                itemsData[i] = this.createGroupElement(arr[i]);
23004            } else {
23005                jLen = itemsData[i].it.length;
23006                for(j=0;j<jLen;j+=1){
23007                    itemsData[i].prevViewData[j] = itemsData[i].it[j];
23008                }
23009            }
23010            this.searchShapes(arr[i].it,itemsData[i].it,itemsData[i].prevViewData, shouldRender, ownTransforms);
23011        }else if(arr[i].ty == 'tr'){
23012            if(!processedPos){
23013                currentTransform = this.createTransformElement(arr[i]);
23014                itemsData[i] = currentTransform;
23015            }
23016            ownTransforms.push(itemsData[i]);
23017            this.addTransformToStyleList(itemsData[i]);
23018        }else if(arr[i].ty == 'sh' || arr[i].ty == 'rc' || arr[i].ty == 'el' || arr[i].ty == 'sr'){
23019            if(!processedPos){
23020                itemsData[i] = this.createShapeElement(arr[i]);
23021            }
23022            
23023        }else if(arr[i].ty == 'tm' || arr[i].ty == 'rd'){
23024            if(!processedPos){
23025                modifier = ShapeModifiers.getModifier(arr[i].ty);
23026                modifier.init(this,arr[i]);
23027                itemsData[i] = modifier;
23028                this.shapeModifiers.push(modifier);
23029            } else {
23030                modifier = itemsData[i];
23031                modifier.closed = false;
23032            }
23033            ownModifiers.push(modifier);
23034        } else if(arr[i].ty == 'rp'){
23035            if(!processedPos){
23036                modifier = ShapeModifiers.getModifier(arr[i].ty);
23037                itemsData[i] = modifier;
23038                modifier.init(this,arr,i,itemsData);
23039                this.shapeModifiers.push(modifier);
23040                shouldRender = false;
23041            }else{
23042                modifier = itemsData[i];
23043                modifier.closed = true;
23044            }
23045            ownModifiers.push(modifier);
23046        }
23047        this.addProcessedElement(arr[i], i + 1);
23048    }
23049    this.removeTransformFromStyleList();
23050    this.closeStyles(ownStyles);
23051    len = ownModifiers.length;
23052    for(i=0;i<len;i+=1){
23053        ownModifiers[i].closed = true;
23054    }
23055};
23056
23057CVShapeElement.prototype.renderInnerContent = function() {
23058    this.transformHelper.opacity = 1;
23059    this.transformHelper._opMdf = false;
23060    this.renderModifiers();
23061    this.transformsManager.processSequences(this._isFirstFrame);
23062    this.renderShape(this.transformHelper,this.shapesData,this.itemsData,true);
23063};
23064
23065CVShapeElement.prototype.renderShapeTransform = function(parentTransform, groupTransfor
23065m) {
23066    var props, groupMatrix;
23067    if(parentTransform._opMdf || groupTransform.op._mdf || this._isFirstFrame) {
23068        groupTransform.opacity = parentTransform.opacity;
23069        groupTransform.opacity *= groupTransform.op.v;
23070        groupTransform._opMdf = true;
23071    }
23072};
23073
23074CVShapeElement.prototype.drawLayer = function() {
23075    var i, len = this.stylesList.length;
23076    var j, jLen, k, kLen,elems,nodes, renderer = this.globalData.renderer, ctx = this.globalData.canvasContext, type, currentStyle;
23077    for(i=0;i<len;i+=1){
23078        currentStyle = this.stylesList[i];
23079        type = currentStyle.type;
23080
23081        //Skipping style when
23082        //Stroke width equals 0
23083        //style should not be rendered (extra unused repeaters)
23084        //current opacity equals 0
23085        //global opacity equals 0
23086        if(((type === 'st' || type === 'gs') && currentStyle.wi === 0) || !currentStyle.data._shouldRender || currentStyle.coOp === 0 || this.globalData.currentGlobalAlpha === 0){
23087            continue;
23088        }
23089        renderer.save();
23090        elems = currentStyle.elements;
23091        if(type === 'st' || type === 'gs'){
23092            ctx.strokeStyle = type === 'st' ? currentStyle.co : currentStyle.grd;
23093            ctx.lineWidth = currentStyle.wi;
23094            ctx.lineCap = currentStyle.lc;
23095            ctx.lineJoin = currentStyle.lj;
23096            ctx.miterLimit = currentStyle.ml || 0;
23097        } else {
23098            ctx.fillStyle = type === 'fl' ? currentStyle.co : currentStyle.grd;
23099        }
23100        renderer.ctxOpacity(currentStyle.coOp);
23101        if(type !== 'st' && type !== 'gs'){
23102            ctx.beginPath();
23103        }
23104        renderer.ctxTransform(currentStyle.preTransforms.finalTransform.props);
23105        jLen = elems.length;
23106        for(j=0;j<jLen;j+=1){
23107            if(type === 'st' || type === 'gs'){
23108                ctx.beginPath();
23109                if(currentStyle.da){
23110                    ctx.setLineDash(currentStyle.da);
23111                    ctx.lineDashOffset = currentStyle.do;
23112                }
23113            }
23114            nodes = elems[j].trNodes;
23115            kLen = nodes.length;
23116
23117            for(k=0;k<kLen;k+=1){
23118                if(nodes[k].t == 'm'){
23119                    ctx.moveTo(nodes[k].p[0],nodes[k].p[1]);
23120                }else if(nodes[k].t == 'c'){
23121                    ctx.bezierCurveTo(nodes[k].pts[0],nodes[k].pts[1],nodes[k].pts[2],nodes[k].pts[3],nodes[k].pts[4],nodes[k].pts[5]);
23122                }else{
23123                    ctx.closePath();
23124                }
23125            }
23126            if(type === 'st' || type === 'gs'){
23127                ctx.stroke();
23128                if(currentStyle.da){
23129                    ctx.setLineDash(this.dashResetter);
23130                }
23131            }
23132        }
23133        if(type !== 'st' && type !== 'gs'){
23134            ctx.fill(currentStyle.r);
23135        }
23136        renderer.restore();
23137    }
23138};
23139
23140CVShapeElement.prototype.renderShape = function(parentTransform,items,data,isMain){
23141    var i, len = items.length - 1;
23142    var groupTransform;
23143    groupTransform = parentTransform;
23144    for(i=len;i>=0;i-=1){
23145        if(items[i].ty == 'tr'){
23146            groupTransform = data[i].transform;
23147            this.renderShapeTransform(parentTransform, groupTransform);
23148        }else if(items[i].ty == 'sh' || items[i].ty == 'el' || items[i].ty == 'rc' || items[i].ty == 'sr'){
23149            this.renderPath(items[i],data[i]);
23150        }else if(items[i].ty == 'fl'){
23151            this.renderFill(items[i],data[i],groupTransform);
23152        }else if(items[i].ty == 'st'){
23153            this.renderStroke(items[i],data[i],groupTransform);
23154        }else if(items[i].ty == 'gf' || items[i].ty == 'gs'){
23155            this.renderGradientFill(items[i],data[i],groupTransform);
23156        }else if(items[i].ty == 'gr'){
23157            this.renderShape(groupTransform,items[i].it,data[i].it);
23158        }else if(items[i].ty == 'tm'){
23159            //
23160        }
23161    }
23162    if(isMain){
23163        this.drawLayer();
23164    }
23165    
23166};
23167
23168CVShapeElement.prototype.renderStyledShape = function(styledShape, shape){
23169    if(this._isFirstFrame || shape._mdf || styledShape.transforms._mdf) {
23170        var shapeNodes = styledShape.trNodes;
23171        var paths = shape.paths;
23172        var i, len, j, jLen = paths._length;
23173        shapeNodes.length = 0;
23174        var groupTransformMat = styledShape.transforms.finalTransform;
23175        for (j = 0; j < jLen; j += 1) {
23176            var pathNodes = paths.shapes[j];
23177            if(pathNodes && pathNodes.v){
23178                len = pathNodes._length;
23179                for (i = 1; i < len; i += 1) {
23180                    if (i === 1) {
23181                        shapeNodes.push({
23182                            t: 'm',
23183                            p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
23184                        });
23185                    }
23186                    shapeNodes.push({
23187                        t: 'c',
23188                        pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[i], pathNodes.v[i])
23189                    });
23190                }
23191                if (len === 1) {
23192                    shapeNodes.push({
23193                        t: 'm',
23194                        p: groupTransformMat.applyToPointArray(pathNodes.v[0][0], pathNodes.v[0][1], 0)
23195                    });
23196                }
23197                if (pathNodes.c && len) {
23198                    shapeNodes.push({
23199                        t: 'c',
23200                        pts: groupTransformMat.applyToTriplePoints(pathNodes.o[i - 1], pathNodes.i[0], pathNodes.v[0])
23201                    });
23202                    shapeNodes.push({
23203                        t: 'z'
23204                    });
23205                }
23206            }
23207        }
23208        styledShape.trNodes = shapeNodes;
23209    }
23210}
23211
23212CVShapeElement.prototype.renderPath = function(pathData,itemData){
23213    if(pathData.hd !== true && pathData._shouldRender) {
23214        var i, len = itemData.styledShapes.length;
23215        for (i = 0; i < len; i += 1) {
23216            this.renderStyledShape(itemData.styledShapes[i], itemData.sh);
23217        }
23218    }
23219};
23220
23221CVShapeElement.prototype.renderFill = function(styleData,itemData, groupTransform){
23222    var styleElem = itemData.style;
23223
23224    if (itemData.c._mdf || this._isFirstFrame) {
23225        styleElem.co = 'rgb(' 
23226        + bm_floor(itemData.c.v[0]) + ',' 
23227        + bm_floor(itemData.c.v[1]) + ',' 
23228        + bm_floor(itemData.c.v[2]) + ')';
23229    }
23230    if (itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame) {
vendor: 1,609 bytes, lines 23231-23265
23231        styleElem.coOp = itemData.o.v * groupTransform.opacity;
23232    }
23233};
23234
23235CVShapeElement.prototype.renderGradientFill = function(styleData,itemData, groupTransform){
23236    var styleElem = itemData.style;
23237    if(!styleElem.grd || itemData.g._mdf || itemData.s._mdf || itemData.e._mdf || (styleData.t !== 1 && (itemData.h._mdf || itemData.a._mdf))) {
23238        var ctx = this.globalData.canvasContext;
23239        var grd;
23240        var pt1 = itemData.s.v, pt2 = itemData.e.v;
23241        if (styleData.t === 1) {
23242            grd = ctx.createLinearGradient(pt1[0], pt1[1], pt2[0], pt2[1]);
23243        } else {
23244            var rad = Math.sqrt(Math.pow(pt1[0] - pt2[0], 2) + Math.pow(pt1[1] - pt2[1], 2));
23245            var ang = Math.atan2(pt2[1] - pt1[1], pt2[0] - pt1[0]);
23246
23247            var percent = itemData.h.v >= 1 ? 0.99 : itemData.h.v <= -1 ? -0.99: itemData.h.v;
23248            var dist = rad * percent;
23249            var x = Math.cos(ang + itemData.a.v) * dist + pt1[0];
23250            var y = Math.sin(ang + itemData.a.v) * dist + pt1[1];
23251            var grd = ctx.createRadialGradient(x, y, 0, pt1[0], pt1[1], rad);
23252        }
23253
23254        var i, len = styleData.g.p;
23255        var cValues = itemData.g.c;
23256        var opacity = 1;
23257
23258        for (i = 0; i < len; i += 1){
23259            if(itemData.g._hasOpacity && itemData.g._collapsable) {
23260                opacity = itemData.g.o[i*2 + 1];
23261            }
23262            grd.addColorStop(cValues[i * 4] / 100,'rgba('+ cValues[i * 4 + 1] + ',' + cValues[i * 4 + 2] + ','+cValues[i * 4 + 3] + ',' + opacity + ')');
23263        }
23264        styleElem.grd = grd;
23265    }
vendor: 7,771 bytes, lines 23266-23454
23266    styleElem.coOp = itemData.o.v*groupTransform.opacity;
23267    
23268};
23269
23270CVShapeElement.prototype.renderStroke = function(styleData,itemData, groupTransform){
23271    var styleElem = itemData.style;
23272    var d = itemData.d;
23273    if(d && (d._mdf  || this._isFirstFrame)){
23274        styleElem.da = d.dashArray;
23275        styleElem.do = d.dashoffset[0];
23276    }
23277    if(itemData.c._mdf || this._isFirstFrame){
23278        styleElem.co = 'rgb('+bm_floor(itemData.c.v[0])+','+bm_floor(itemData.c.v[1])+','+bm_floor(itemData.c.v[2])+')';
23279    }
23280    if(itemData.o._mdf || groupTransform._opMdf || this._isFirstFrame){
23281        styleElem.coOp = itemData.o.v*groupTransform.opacity;
23282    }
23283    if(itemData.w._mdf || this._isFirstFrame){
23284        styleElem.wi = itemData.w.v;
23285    }
23286};
23287
23288
23289CVShapeElement.prototype.destroy = function(){
23290    this.shapesData = null;
23291    this.globalData = null;
23292    this.canvasContext = null;
23293    this.stylesList.length = 0;
23294    this.itemsData.length = 0;
23295};
23296
23297
23298function CVSolidElement(data, globalData, comp) {
23299    this.initElement(data,globalData,comp);
23300}
23301extendPrototype([BaseElement, TransformElement, CVBaseElement, HierarchyElement, FrameElement, RenderableElement], CVSolidElement);
23302
23303CVSolidElement.prototype.initElement = SVGShapeElement.prototype.initElement;
23304CVSolidElement.prototype.prepareFrame = IImageElement.prototype.prepareFrame;
23305
23306CVSolidElement.prototype.renderInnerContent = function() {
23307    var ctx = this.canvasContext;
23308    ctx.fillStyle = this.data.sc;
23309    ctx.fillRect(0, 0, this.data.sw, this.data.sh);
23310    //
23311};
23312function CVTextElement(data, globalData, comp){
23313    this.textSpans = [];
23314    this.yOffset = 0;
23315    this.fillColorAnim = false;
23316    this.strokeColorAnim = false;
23317    this.strokeWidthAnim = false;
23318    this.stroke = false;
23319    this.fill = false;
23320    this.justifyOffset = 0;
23321    this.currentRender = null;
23322    this.renderType = 'canvas';
23323    this.values = {
23324        fill: 'rgba(0,0,0,0)',
23325        stroke: 'rgba(0,0,0,0)',
23326        sWidth: 0,
23327        fValue: ''
23328    };
23329    this.initElement(data,globalData,comp);
23330}
23331extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement], CVTextElement);
23332
23333CVTextElement.prototype.tHelper = createTag('canvas').getContext('2d');
23334
23335CVTextElement.prototype.buildNewText = function(){
23336    var documentData = this.textProperty.currentData;
23337    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
23338
23339    var hasFill = false;
23340    if(documentData.fc) {
23341        hasFill = true;
23342        this.values.fill = this.buildColor(documentData.fc);
23343    }else{
23344        this.values.fill = 'rgba(0,0,0,0)';
23345    }
23346    this.fill = hasFill;
23347    var hasStroke = false;
23348    if(documentData.sc){
23349        hasStroke = true;
23350        this.values.stroke = this.buildColor(documentData.sc);
23351        this.values.sWidth = documentData.sw;
23352    }
23353    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
23354    var i, len;
23355    var letters = documentData.l;
23356    var matrixHelper = this.mHelper;
23357    this.stroke = hasStroke;
23358    this.values.fValue = documentData.finalSize + 'px '+ this.globalData.fontManager.getFontByName(documentData.f).fFamily;
23359    len = documentData.finalText.length;
23360    //this.tHelper.font = this.values.fValue;
23361    var charData, shapeData, k, kLen, shapes, j, jLen, pathNodes, commands, pathArr, singleShape = this.data.singleShape;
23362    var trackingOffset = documentData.tr/1000*documentData.finalSize;
23363    var xPos = 0, yPos = 0, firstLine = true;
23364    var cnt = 0;
23365    for (i = 0; i < len; i += 1) {
23366        charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
23367        shapeData = charData && charData.data || {};
23368        matrixHelper.reset();
23369        if(singleShape && letters[i].n) {
23370            xPos = -trackingOffset;
23371            yPos += documentData.yOffset;
23372            yPos += firstLine ? 1 : 0;
23373            firstLine = false;
23374        }
23375
23376        shapes = shapeData.shapes ? shapeData.shapes[0].it : [];
23377        jLen = shapes.length;
23378        matrixHelper.scale(documentData.finalSize/100,documentData.finalSize/100);
23379        if(singleShape){
23380            this.applyTextPropertiesToMatrix(documentData, matrixHelper, letters[i].line, xPos, yPos);
23381        }
23382        commands = createSizedArray(jLen);
23383        for(j=0;j<jLen;j+=1){
23384            kLen = shapes[j].ks.k.i.length;
23385            pathNodes = shapes[j].ks.k;
23386            pathArr = [];
23387            for(k=1;k<kLen;k+=1){
23388                if(k==1){
23389                    pathArr.push(matrixHelper.applyToX(pathNodes.v[0][0],pathNodes.v[0][1],0),matrixHelper.applyToY(pathNodes.v[0][0],pathNodes.v[0][1],0));
23390                }
23391                pathArr.push(matrixHelper.applyToX(pathNodes.o[k-1][0],pathNodes.o[k-1][1],0),matrixHelper.applyToY(pathNodes.o[k-1][0],pathNodes.o[k-1][1],0),matrixHelper.applyToX(pathNodes.i[k][0],pathNodes.i[k][1],0),matrixHelper.applyToY(pathNodes.i[k][0],pathNodes.i[k][1],0),matrixHelper.applyToX(pathNodes.v[k][0],pathNodes.v[k][1],0),matrixHelper.applyToY(pathNodes.v[k][0],pathNodes.v[k][1],0));
23392            }
23393            pathArr.push(matrixHelper.applyToX(pathNodes.o[k-1][0],pathNodes.o[k-1][1],0),matrixHelper.applyToY(pathNodes.o[k-1][0],pathNodes.o[k-1][1],0),matrixHelper.applyToX(pathNodes.i[0][0],pathNodes.i[0][1],0),matrixHelper.applyToY(pathNodes.i[0][0],pathNodes.i[0][1],0),matrixHelper.applyToX(pathNodes.v[0][0],pathNodes.v[0][1],0),matrixHelper.applyToY(pathNodes.v[0][0],pathNodes.v[0][1],0));
23394            commands[j] = pathArr;
23395        }
23396        if(singleShape){
23397            xPos += letters[i].l;
23398            xPos += trackingOffset;
23399        }
23400        if(this.textSpans[cnt]){
23401            this.textSpans[cnt].elem = commands;
23402        } else {
23403            this.textSpans[cnt] = {elem: commands};
23404        }
23405        cnt +=1;
23406    }
23407};
23408
23409CVTextElement.prototype.renderInnerContent = function(){
23410    var ctx = this.canvasContext;
23411    var finalMat = this.finalTransform.mat.props;
23412    ctx.font = this.values.fValue;
23413    ctx.lineCap = 'butt';
23414    ctx.lineJoin = 'miter';
23415    ctx.miterLimit = 4;
23416
23417    if(!this.data.singleShape){
23418        this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
23419    }
23420
23421    var  i,len, j, jLen, k, kLen;
23422    var renderedLetters = this.textAnimator.renderedLetters;
23423
23424    var letters = this.textProperty.currentData.l;
23425
23426    len = letters.length;
23427    var renderedLetter;
23428    var lastFill = null, lastStroke = null, lastStrokeW = null, commands, pathArr;
23429    for(i=0;i<len;i+=1){
23430        if(letters[i].n){
23431            continue;
23432        }
23433        renderedLetter = renderedLetters[i];
23434        if(renderedLetter){
23435            this.globalData.renderer.save();
23436            this.globalData.renderer.ctxTransform(renderedLetter.p);
23437            this.globalData.renderer.ctxOpacity(renderedLetter.o);
23438        }
23439        if(this.fill){
23440            if(renderedLetter && renderedLetter.fc){
23441                if(lastFill !== renderedLetter.fc){
23442                    lastFill = renderedLetter.fc;
23443                    ctx.fillStyle = renderedLetter.fc;
23444                }
23445            }else if(lastFill !== this.values.fill){
23446                lastFill = this.values.fill;
23447                ctx.fillStyle = this.values.fill;
23448            }
23449            commands = this.textSpans[i].elem;
23450            jLen = commands.length;
23451            this.globalData.canvasContext.beginPath();
23452            for(j=0;j<jLen;j+=1) {
23453                pathArr = commands[j];
23454                kLen = pathArr.length;
23455                this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
23456                for (k = 2; k < kLen; k += 6) {
23457                    this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
23458                }
23459            }
23460            this.globalData.canvasContext.closePath();
23461            this.globalData.canvasContext.fill();
23462            ///ctx.fillText(this.textSpans[i].val,0,0);
23463        }
23464        if(this.stroke){
23465            if(renderedLetter && renderedLetter.sw){
23466                if(lastStrokeW !== renderedLetter.sw){
23467                    lastStrokeW = renderedLetter.sw;
23468                    ctx.lineWidth = renderedLetter.sw;
23469                }
23470            }else if(lastStrokeW !== this.values.sWidth){
23471                lastStrokeW = this.values.sWidth;
23472                ctx.lineWidth = this.values.sWidth;
23473            }
23474            if(renderedLetter && renderedLetter.sc){
23475                if(lastStroke !== renderedLetter.sc){
23476                    lastStroke = renderedLetter.sc;
23477                    ctx.strokeStyle = renderedLetter.sc;
23478                }
23479            }else if(lastStroke !== this.values.stroke){
23480                lastStroke = this.values.stroke;
23481                ctx.strokeStyle = this.values.stroke;
23482            }
23483            commands = this.textSpans[i].elem;
23484            jLen = commands.length;
23485            this.globalData.canvasContext.beginPath();
23486            for(j=0;j<jLen;j+=1) {
23487                pathArr = commands[j];
23488                kLen = pathArr.length;
23489                this.globalData.canvasContext.moveTo(pathArr[0], pathArr[1]);
23490                for (k = 2; k < kLen; k += 6) {
23491                    this.globalData.canvasContext.bezierCurveTo(pathArr[k], pathArr[k + 1], pathArr[k + 2], pathArr[k + 3], pathArr[k + 4], pathArr[k + 5]);
23492                }
23493            }
23494            this.globalData.canvasContext.closePath();
23495            this.globalData.canvasContext.stroke();
23496            ///ctx.strokeText(letters[i].val,0,0);
23497        }
23498        if(renderedLetter) {
23499            this.globalData.renderer.restore();
23500        }
23501    }
23502};
23503function CVEffects() {
23504
23505}
23506CVEffects.prototype.renderFrame = function(){};
23507function HBaseElement(data,globalData,comp){}
23508HBaseElement.prototype = {
23509    checkBlendMode: function(){},
23510    initRendererElement: function(){
23511        this.baseElement = createTag(this.data.tg || 'div');
23512        if(this.data.hasMask) {
23513            this.svgElement = createNS('svg');
23514            this.layerElement = createNS('g');
23515            this.maskedElement = this.layerElement;
23516            this.svgElement.appendChild(this.layerElement);
23517            this.baseElement.appendChild(this.svgElement);
23518        } else {
23519            this.layerElement = this.baseElement;
23520        }
23521        styleDiv(this.baseElement);
23522    },
23523    createContainerElements: function(){
23524        this.renderableEffectsManager = new CVEffects(this);
23525        this.transformedElement = this.baseElement;
23526        this.maskedElement = this.layerElement;
23527        if (this.data.ln) {
23528            this.layerElement.setAttribute('id',this.data.ln);
23529        }
23530        if (this.data.cl) {
23531            this.layerElement.setAttribute('class', this.data.cl);
23532        }
23533        if (this.data.bm !== 0) {
23534            this.setBlendMode();
23535        }
23536    },
23537    renderElement: function() {
23538        if(this.finalTransform._matMdf){
23539            this.transformedElement.style.transform = this.transformedElement.style.webkitTransform = this.finalTransform.mat.toCSS();
23540        }
23541        if(this.finalTransform._opMdf){
23542            this.transformedElement.style.opacity = this.finalTransform.mProp.o.v;
23543        }
23544    },
23545    renderFrame: function() {
23546        //If it is exported as hidden (data.hd === true) no need to render
vendor: 13,252 bytes, lines 23547-23907
23547        //If it is not visible no need to render
23548        if (this.data.hd || this.hidden) {
23549            return;
23550        }
23551        this.renderTransform();
23552        this.renderRenderable();
23553        this.renderElement();
23554        this.renderInnerContent();
23555        if (this._isFirstFrame) {
23556            this._isFirstFrame = false;
23557        }
23558    },
23559    destroy: function(){
23560        this.layerElement = null;
23561        this.transformedElement = null;
23562        if(this.matteElement) {
23563            this.matteElement = null;
23564        }
23565        if(this.maskManager) {
23566            this.maskManager.destroy();
23567            this.maskManager = null;
23568        }
23569    },
23570    createRenderableComponents: function(){
23571        this.maskManager = new MaskElement(this.data, this, this.globalData);
23572    },
23573    addEffects: function(){
23574    },
23575    setMatte: function(){}
23576};
23577HBaseElement.prototype.getBaseElement = SVGBaseElement.prototype.getBaseElement;
23578HBaseElement.prototype.destroyBaseElement = HBaseElement.prototype.destroy;
23579HBaseElement.prototype.buildElementParenting = HybridRenderer.prototype.buildElementParenting;
23580function HSolidElement(data,globalData,comp){
23581    this.initElement(data,globalData,comp);
23582}
23583extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement], HSolidElement);
23584
23585HSolidElement.prototype.createContent = function(){
23586    var rect;
23587    if(this.data.hasMask){
23588        rect = createNS('rect');
23589        rect.setAttribute('width',this.data.sw);
23590        rect.setAttribute('height',this.data.sh);
23591        rect.setAttribute('fill',this.data.sc);
23592        this.svgElement.setAttribute('width',this.data.sw);
23593        this.svgElement.setAttribute('height',this.data.sh);
23594    } else {
23595        rect = createTag('div');
23596        rect.style.width = this.data.sw + 'px';
23597        rect.style.height = this.data.sh + 'px';
23598        rect.style.backgroundColor = this.data.sc;
23599    }
23600    this.layerElement.appendChild(rect);
23601};
23602
23603function HCompElement(data,globalData,comp){
23604    this.layers = data.layers;
23605    this.supports3d = !data.hasMask;
23606    this.completeLayers = false;
23607    this.pendingElements = [];
23608    this.elements = this.layers ? createSizedArray(this.layers.length) : [];
23609    this.initElement(data,globalData,comp);
23610    this.tm = data.tm ? PropertyFactory.getProp(this,data.tm,0,globalData.frameRate,this) : {_placeholder:true};
23611}
23612
23613extendPrototype([HybridRenderer, ICompElement, HBaseElement], HCompElement);
23614HCompElement.prototype._createBaseContainerElements = HCompElement.prototype.createContainerElements;
23615
23616HCompElement.prototype.createContainerElements = function(){
23617    this._createBaseContainerElements();
23618    //divElement.style.clip = 'rect(0px, '+this.data.w+'px, '+this.data.h+'px, 0px)';
23619    if(this.data.hasMask){
23620        this.svgElement.setAttribute('width',this.data.w);
23621        this.svgElement.setAttribute('height',this.data.h);
23622        this.transformedElement = this.baseElement;
23623    } else {
23624        this.transformedElement = this.layerElement;
23625    }
23626};
23627
23628HCompElement.prototype.addTo3dContainer = function(elem,pos) {
23629    var j = 0;
23630    var nextElement;
23631    while(j<pos){
23632        if(this.elements[j] && this.elements[j].getBaseElement){
23633            nextElement = this.elements[j].getBaseElement();
23634        }
23635        j += 1;
23636    }
23637    if(nextElement){
23638        this.layerElement.insertBefore(elem, nextElement);
23639    } else {
23640        this.layerElement.appendChild(elem);
23641    }
23642}
23643
23644function HShapeElement(data,globalData,comp){
23645    //List of drawable elements
23646    this.shapes = [];
23647    // Full shape data
23648    this.shapesData = data.shapes;
23649    //List of styles that will be applied to shapes
23650    this.stylesList = [];
23651    //List of modifiers that will be applied to shapes
23652    this.shapeModifiers = [];
23653    //List of items in shape tree
23654    this.itemsData = [];
23655    //List of items in previous shape tree
23656    this.processedElements = [];
23657    // List of animated components
23658    this.animatedContents = [];
23659    this.shapesContainer = createNS('g');
23660    this.initElement(data,globalData,comp);
23661    //Moving any property that doesn't get too much access after initialization because of v8 way of handling more than 10 properties.
23662    // List of elements that have been created
23663    this.prevViewData = [];
23664    this.currentBBox = {
23665        x:999999,
23666        y: -999999,
23667        h: 0,
23668        w: 0
23669    };
23670}
23671extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement], HShapeElement);
23672HShapeElement.prototype._renderShapeFrame = HShapeElement.prototype.renderInnerContent;
23673
23674HShapeElement.prototype.createContent = function(){
23675    var cont;
23676    this.baseElement.style.fontSize = 0;
23677    if (this.data.hasMask) {
23678        this.layerElement.appendChild(this.shapesContainer);
23679        cont = this.svgElement;
23680    } else {
23681        cont = createNS('svg');
23682        var size = this.comp.data ? this.comp.data : this.globalData.compSize;
23683        cont.setAttribute('width',size.w);
23684        cont.setAttribute('height',size.h);
23685        cont.appendChild(this.shapesContainer);
23686        this.layerElement.appendChild(cont);
23687    }
23688
23689    this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0, [], true);
23690    this.filterUniqueShapes();
23691    this.shapeCont = cont;
23692};
23693
23694HShapeElement.prototype.getTransformedPoint = function(transformers, point) {
23695    var i, len = transformers.length;
23696    for(i = 0; i < len; i += 1) {
23697        point = transformers[i].mProps.v.applyToPointArray(point[0], point[1], 0);
23698    }
23699    return point;
23700}
23701
23702HShapeElement.prototype.calculateShapeBoundingBox = function(item, boundingBox) {
23703    var shape = item.sh.v;
23704    var transformers = item.transformers;
23705    var i, len = shape._length, vPoint, oPoint, nextIPoint, nextVPoint, bounds;
23706    if (len <= 1) {
23707        return;
23708    }
23709    for (i = 0; i < len - 1; i += 1) {
23710        vPoint = this.getTransformedPoint(transformers, shape.v[i]);
23711        oPoint = this.getTransformedPoint(transformers, shape.o[i]);
23712        nextIPoint = this.getTransformedPoint(transformers, shape.i[i + 1]);
23713        nextVPoint = this.getTransformedPoint(transformers, shape.v[i + 1]);
23714        this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
23715    }
23716    if(shape.c) {
23717        vPoint = this.getTransformedPoint(transformers, shape.v[i]);
23718        oPoint = this.getTransformedPoint(transformers, shape.o[i]);
23719        nextIPoint = this.getTransformedPoint(transformers, shape.i[0]);
23720        nextVPoint = this.getTransformedPoint(transformers, shape.v[0]);
23721        this.checkBounds(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox);
23722    }
23723}
23724
23725HShapeElement.prototype.checkBounds = function(vPoint, oPoint, nextIPoint, nextVPoint, boundingBox) {
23726    this.getBoundsOfCurve(vPoint, oPoint, nextIPoint, nextVPoint);
23727    var bounds = this.shapeBoundingBox;
23728    boundingBox.x = bm_min(bounds.left, boundingBox.x);
23729    boundingBox.xMax = bm_max(bounds.right, boundingBox.xMax);
23730    boundingBox.y = bm_min(bounds.top, boundingBox.y);
23731    boundingBox.yMax = bm_max(bounds.bottom, boundingBox.yMax);
23732}
23733
23734HShapeElement.prototype.shapeBoundingBox = {
23735    left:0,
23736    right:0,
23737    top:0,
23738    bottom:0,
23739}
23740
23741HShapeElement.prototype.tempBoundingBox = {
23742    x:0,
23743    xMax:0,
23744    y:0,
23745    yMax:0,
23746    width:0,
23747    height:0
23748}
23749
23750HShapeElement.prototype.getBoundsOfCurve = function(p0, p1, p2, p3) {
23751
23752    var bounds = [[p0[0],p3[0]], [p0[1],p3[1]]];
23753
23754    for (var a, b, c, t, b2ac, t1, t2, i = 0; i < 2; ++i) {
23755
23756      b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
23757      a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
23758      c = 3 * p1[i] - 3 * p0[i];
23759
23760      b = b | 0;
23761      a = a | 0;
23762      c = c | 0;
23763
23764      if (a === 0) {
23765
23766        if (b === 0) {
23767          continue;
23768        }
23769
23770        t = -c / b;
23771
23772        if (0 < t && t < 1) {
23773          bounds[i].push(this.calculateF(t,p0,p1,p2,p3,i));
23774        }
23775        continue;
23776      }
23777
23778      b2ac = b * b - 4 * c * a;
23779
23780      if (b2ac < 0) {
23781        continue;
23782      }
23783
23784      t1 = (-b + bm_sqrt(b2ac))/(2 * a);
23785      if (0 < t1 && t1 < 1) bounds[i].push(this.calculateF(t1,p0,p1,p2,p3,i));
23786
23787      t2 = (-b - bm_sqrt(b2ac))/(2 * a);
23788      if (0 < t2 && t2 < 1) bounds[i].push(this.calculateF(t2,p0,p1,p2,p3,i));
23789
23790    }
23791
23792    this.shapeBoundingBox.left = bm_min.apply(null, bounds[0]);
23793    this.shapeBoundingBox.top = bm_min.apply(null, bounds[1]);
23794    this.shapeBoundingBox.right = bm_max.apply(null, bounds[0]);
23795    this.shapeBoundingBox.bottom = bm_max.apply(null, bounds[1]);
23796  };
23797
23798  HShapeElement.prototype.calculateF = function(t, p0, p1, p2, p3, i) {
23799    return bm_pow(1-t, 3) * p0[i]
23800        + 3 * bm_pow(1-t, 2) * t * p1[i]
23801        + 3 * (1-t) * bm_pow(t, 2) * p2[i]
23802        + bm_pow(t, 3) * p3[i];
23803  }
23804
23805HShapeElement.prototype.calculateBoundingBox = function(itemsData, boundingBox) {
23806    var i, len = itemsData.length, path;
23807    for(i = 0; i < len; i += 1) {
23808        if(itemsData[i] && itemsData[i].sh) {
23809            this.calculateShapeBoundingBox(itemsData[i], boundingBox)
23810        } else if(itemsData[i] && itemsData[i].it) {
23811            this.calculateBoundingBox(itemsData[i].it, boundingBox)
23812        }
23813    }
23814}
23815
23816HShapeElement.prototype.currentBoxContains = function(box) {
23817    return this.currentBBox.x <= box.x 
23818    && this.currentBBox.y <= box.y 
23819    && this.currentBBox.width + this.currentBBox.x >= box.x + box.width
23820    && this.currentBBox.height + this.currentBBox.y >= box.y + box.height
23821}
23822
23823HShapeElement.prototype.renderInnerContent = function() {
23824    this._renderShapeFrame();
23825
23826    if(!this.hidden && (this._isFirstFrame || this._mdf)) {
23827        var tempBoundingBox = this.tempBoundingBox;
23828        var max = 999999;
23829        tempBoundingBox.x = max;
23830        tempBoundingBox.xMax = -max;
23831        tempBoundingBox.y = max;
23832        tempBoundingBox.yMax = -max;
23833        this.calculateBoundingBox(this.itemsData, tempBoundingBox);
23834        tempBoundingBox.width = tempBoundingBox.xMax < tempBoundingBox.x ? 0 : tempBoundingBox.xMax - tempBoundingBox.x;
23835        tempBoundingBox.height = tempBoundingBox.yMax < tempBoundingBox.y ? 0 : tempBoundingBox.yMax - tempBoundingBox.y;
23836        //var tempBoundingBox = this.shapeCont.getBBox();
23837        if(this.currentBoxContains(tempBoundingBox)) {
23838            return;
23839        }
23840        var changed = false;
23841        if(this.currentBBox.w !== tempBoundingBox.width){
23842            this.currentBBox.w = tempBoundingBox.width;
23843            this.shapeCont.setAttribute('width',tempBoundingBox.width);
23844            changed = true;
23845        }
23846        if(this.currentBBox.h !== tempBoundingBox.height){
23847            this.currentBBox.h = tempBoundingBox.height;
23848            this.shapeCont.setAttribute('height',tempBoundingBox.height);
23849            changed = true;
23850        }
23851        if(changed  || this.currentBBox.x !== tempBoundingBox.x  || this.currentBBox.y !== tempBoundingBox.y){
23852            this.currentBBox.w = tempBoundingBox.width;
23853            this.currentBBox.h = tempBoundingBox.height;
23854            this.currentBBox.x = tempBoundingBox.x;
23855            this.currentBBox.y = tempBoundingBox.y;
23856
23857            this.shapeCont.setAttribute('viewBox',this.currentBBox.x+' '+this.currentBBox.y+' '+this.currentBBox.w+' '+this.currentBBox.h);
23858            this.shapeCont.style.transform = this.shapeCont.style.webkitTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
23859        }
23860    }
23861
23862};
23863function HTextElement(data,globalData,comp){
23864    this.textSpans = [];
23865    this.textPaths = [];
23866    this.currentBBox = {
23867        x:999999,
23868        y: -999999,
23869        h: 0,
23870        w: 0
23871    };
23872    this.renderType = 'svg';
23873    this.isMasked = false;
23874    this.initElement(data,globalData,comp);
23875
23876}
23877extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement], HTextElement);
23878
23879HTextElement.prototype.createContent = function(){
23880    this.isMasked = this.checkMasks();
23881    if(this.isMasked){
23882        this.renderType = 'svg';
23883        this.compW = this.comp.data.w;
23884        this.compH = this.comp.data.h;
23885        this.svgElement.setAttribute('width',this.compW);
23886        this.svgElement.setAttribute('height',this.compH);
23887        var g = createNS('g');
23888        this.maskedElement.appendChild(g);
23889        this.innerElem = g;
23890    } else {
23891        this.renderType = 'html';
23892        this.innerElem = this.layerElement;
23893    }
23894
23895    this.checkParenting();
23896
23897};
23898
23899HTextElement.prototype.buildNewText = function(){
23900    var documentData = this.textProperty.currentData;
23901    this.renderedLetters = createSizedArray(documentData.l ? documentData.l.length : 0);
23902    var innerElemStyle = this.innerElem.style;
23903    innerElemStyle.color = innerElemStyle.fill = documentData.fc ? this.buildColor(documentData.fc) : 'rgba(0,0,0,0)';
23904    if(documentData.sc){
23905        innerElemStyle.stroke = this.buildColor(documentData.sc);
23906        innerElemStyle.strokeWidth = documentData.sw+'px';
23907    }
23908    var fontData = this.globalData.fontManager.getFontByName(documentData.f);
23909    if(!this.globalData.fontManager.chars){
23910        innerElemStyle.fontSize = documentData.finalSize+'px';
23911        innerElemStyle.lineHeight = documentData.finalSize+'px';
23912        if(fontData.fClass){
23913            this.innerElem.className = fontData.fClass;
23914        } else {
23915            innerElemStyle.fontFamily = fontData.fFamily;
23916            var fWeight = documentData.fWeight, fStyle = documentData.fStyle;
23917            innerElemStyle.fontStyle = fStyle;
23918            innerElemStyle.fontWeight = fWeight;
23919        }
23920    }
23921    var i, len;
23922
23923    var letters = documentData.l;
23924    len = letters.length;
23925    var tSpan,tParent,tCont;
23926    var matrixHelper = this.mHelper;
23927    var shapes, shapeStr = '';
23928    var cnt = 0;
23929    for (i = 0;i < len ;i += 1) {
23930        if(this.globalData.fontManager.chars){
23931            if(!this.textPaths[cnt]){
23932                tSpan = createNS('path');
23933                tSpan.setAttribute('stroke-linecap', 'butt');
23934                tSpan.setAttribute('stroke-linejoin','round');
23935                tSpan.setAttribute('stroke-miterlimit','4');
23936            } else {
23937                tSpan = this.textPaths[cnt];
23938            }
23939            if(!this.isMasked){
23940                if(this.textSpans[cnt]){
23941                    tParent = this.textSpans[cnt];
23942                    tCont = tParent.children[0];
23943                } else {
23944
23945                    tParent = createTag('div');
23946                    tParent.style.lineHeight = 0;
23947                    tCont = createNS('svg');
23948                    tCont.appendChild(tSpan);
23949                    styleDiv(tParent);
23950                }
23951            }
23952        }else{
23953            if(!this.isMasked){
23954                if(this.textSpans[cnt]){
23955                    tParent = this.textSpans[cnt];
23956                    tSpan = this.textPaths[cnt];
23957                } else {
23958                    tParent = createTag('span');
23959                    styleDiv(tParent);
23960                    tSpan = createTag('span');
23961                    styleDiv(tSpan);
23962                    tParent.appendChild(tSpan);
23963                }
23964            } else {
23965                tSpan = this.textPaths[cnt] ? this.textPaths[cnt] : createNS('text');
23966            }
23967        }
23968        //tSpan.setAttribute('visibility', 'hidden');
23969        if(this.globalData.fontManager.chars){
23970            var charData = this.globalData.fontManager.getCharData(documentData.finalText[i], fontData.fStyle, this.globalData.fontManager.getFontByName(documentData.f).fFamily);
23971            var shapeData;
23972            if(charData){
23973                shapeData = charData.data;
23974            } else {
23975                shapeData = null;
23976            }
23977            matrixHelper.reset();
23978            if(shapeData && shapeData.shapes){
23979                shapes = shapeData.shapes[0].it;
23980                matrixHelper.scale(documentData.finalSize/100,documentData.finalSize/100);
23981                shapeStr = this.createPathShape(matrixHelper,shapes);
23982                tSpan.setAttribute('d',shapeStr);
23983            }
23984            if(!this.isMasked){
23985                this.innerElem.appendChild(tParent);
23986                if(shapeData && shapeData.shapes){
23987
23988                    //document.body.appendChild is needed to get exact measure of shape
23989                    document.body.appendChild(tCont);
23990                    var boundingBox = tCont.getBBox();
23991                    tCont.setAttribute('width',boundingBox.width + 2);
23992                    tCont.setAttribute('height',boundingBox.height + 2);
23993                    tCont.setAttribute('viewBox',(boundingBox.x-1)+' '+ (boundingBox.y-1)+' '+ (boundingBox.width+2)+' '+ (boundingBox.height+2));
23994                    tCont.style.transform = tCont.style.webkitTransform = 'translate(' + (boundingBox.x-1) + 'px,' + (boundingBox.y-1) + 'px)';
23995
23996                    letters[i].yOffset = boundingBox.y-1;
23997
23998                } else{
23999                    tCont.setAttribute('width',1);
24000                    tCont.setAttribute('height',1);
24001                }
24002                    tParent.appendChild(tCont);
24003            }else{
24004                this.innerElem.appendChild(tSpan);
24005            }
24006        }else{
24007            tSpan.textContent = letters[i].val;
24008            tSpan.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space","preserve");
24009            if(!this.isMasked){
24010                this.innerElem.appendChild(tParent);
24011                //
24012                tSpan.style.transform = tSpan.style.webkitTransform = 'translate3d(0,'+ -documentData.finalSize/1.2+'px,0)';
24013            } else {
24014                this.innerElem.appendChild(tSpan);
24015            }
24016        }
24017        //
24018        if(!this.isMasked){
24019            this.textSpans[cnt] = tParent;
24020        }else{
24021            this.textSpans[cnt] = tSpan;
24022        }
24023        this.textSpans[cnt].style.display = 'block';
24024        this.textPaths[cnt] = tSpan;
24025        cnt += 1;
24026    }
24027    while(cnt < this.textSpans.length){
24028        this.textSpans[cnt].style.display = 'none';
24029        cnt += 1;
24030    }
24031};
24032
24033HTextElement.prototype.renderInnerContent = function() {
24034
24035    if(this.data.singleShape){
24036        if(!this._isFirstFrame && !this.lettersChangedFlag){
24037            return;
24038        } else {
24039            // Todo Benchmark if using this is better than getBBox
24040             if(this.isMasked && this.finalTransform._matMdf){
24041                 this.svgElement.setAttribute('viewBox',-this.finalTransform.mProp.p.v[0]+' '+ -this.finalTransform.mProp.p.v[1]+' '+this.compW+' '+this.compH);
24042                this.svgElement.style.transform = this.svgElement.style.webkitTransform = 'translate(' + -this.finalTransform.mProp.p.v[0] + 'px,' + -this.finalTransform.mProp.p.v[1] + 'px)';
24043             }
24044        }
24045    }
24046
24047    this.textAnimator.getMeasures(this.textProperty.currentData, this.lettersChangedFlag);
24048    if(!this.lettersChangedFlag && !this.textAnimator.lettersChangedFlag){
24049        return;
24050    }
24051    var  i,len, count = 0;
24052    var renderedLetters = this.textAnimator.renderedLetters;
24053
24054    var letters = this.textProperty.currentData.l;
24055
24056    len = letters.length;
24057    var renderedLetter, textSpan, textPath;
24058    for(i=0;i<len;i+=1){
24059        if(letters[i].n){
24060            count += 1;
24061            continue;
24062        }
24063        textSpan = this.textSpans[i];
24064        textPath = this.textPaths[i];
24065        renderedLetter = renderedLetters[count];
24066        count += 1;
24067        if(renderedLetter._mdf.m) {
24068            if(!this.isMasked){
24069                textSpan.style.transform = textSpan.style.webkitTransform = renderedLetter.m;
24070            }else{
24071                textSpan.setAttribute('transform',renderedLetter.m);
24072            }
24073        }
24074        ////textSpan.setAttribute('opacity',renderedLetter.o);
24075        textSpan.style.opacity = renderedLetter.o;
24076        if(renderedLetter.sw && renderedLetter._mdf.sw){
24077            textPath.setAttribute('stroke-width',renderedLetter.sw);
24078        }
24079        if(renderedLetter.sc && renderedLetter._mdf.sc){
24080            textPath.setAttribute('stroke',renderedLetter.sc);
24081        }
24082        if(renderedLetter.fc && renderedLetter._mdf.fc){
24083            textPath.setAttribute('fill',renderedLetter.fc);
24084            textPath.style.color = renderedLetter.fc;
24085        }
24086    }
24087
24088    if(this.innerElem.getBBox && !this.hidden && (this._isFirstFrame || this._mdf)){
24089        var boundingBox = this.innerElem.getBBox();
24090
vendor: 8,881 bytes, lines 24091-24298
24091        if(this.currentBBox.w !== boundingBox.width){
24092            this.currentBBox.w = boundingBox.width;
24093            this.svgElement.setAttribute('width',boundingBox.width);
24094        }
24095        if(this.currentBBox.h !== boundingBox.height){
24096            this.currentBBox.h = boundingBox.height;
24097            this.svgElement.setAttribute('height',boundingBox.height);
24098        }
24099
24100        var margin = 1;
24101        if(this.currentBBox.w !== (boundingBox.width + margin*2) || this.currentBBox.h !== (boundingBox.height + margin*2)  || this.currentBBox.x !== (boundingBox.x - margin)  || this.currentBBox.y !== (boundingBox.y - margin)){
24102            this.currentBBox.w = boundingBox.width + margin*2;
24103            this.currentBBox.h = boundingBox.height + margin*2;
24104            this.currentBBox.x = boundingBox.x - margin;
24105            this.currentBBox.y = boundingBox.y - margin;
24106
24107            this.svgElement.setAttribute('viewBox',this.currentBBox.x+' '+this.currentBBox.y+' '+this.currentBBox.w+' '+this.currentBBox.h);
24108            this.svgElement.style.transform = this.svgElement.style.webkitTransform = 'translate(' + this.currentBBox.x + 'px,' + this.currentBBox.y + 'px)';
24109        }
24110    }
24111};
24112function HImageElement(data,globalData,comp){
24113    this.assetData = globalData.getAssetData(data.refId);
24114    this.initElement(data,globalData,comp);
24115}
24116
24117extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement], HImageElement);
24118
24119
24120HImageElement.prototype.createContent = function(){
24121    var assetPath = this.globalData.getAssetsPath(this.assetData);
24122    var img = new Image();
24123
24124    if(this.data.hasMask){
24125        this.imageElem = createNS('image');
24126        this.imageElem.setAttribute('width',this.assetData.w+"px");
24127        this.imageElem.setAttribute('height',this.assetData.h+"px");
24128        this.imageElem.setAttributeNS('http://www.w3.org/1999/xlink','href',assetPath);
24129        this.layerElement.appendChild(this.imageElem);
24130        this.baseElement.setAttribute('width',this.assetData.w);
24131        this.baseElement.setAttribute('height',this.assetData.h);
24132    } else {
24133        this.layerElement.appendChild(img);
24134    }
24135    img.src = assetPath;
24136    if(this.data.ln){
24137        this.baseElement.setAttribute('id',this.data.ln);
24138    }
24139};
24140function HCameraElement(data,globalData,comp){
24141    this.initFrame();
24142    this.initBaseData(data,globalData,comp);
24143    this.initHierarchy();
24144    var getProp = PropertyFactory.getProp;
24145    this.pe = getProp(this,data.pe,0,0,this);
24146    if(data.ks.p.s){
24147        this.px = getProp(this,data.ks.p.x,1,0,this);
24148        this.py = getProp(this,data.ks.p.y,1,0,this);
24149        this.pz = getProp(this,data.ks.p.z,1,0,this);
24150    }else{
24151        this.p = getProp(this,data.ks.p,1,0,this);
24152    }
24153    if(data.ks.a){
24154        this.a = getProp(this,data.ks.a,1,0,this);
24155    }
24156    if(data.ks.or.k.length && data.ks.or.k[0].to){
24157        var i,len = data.ks.or.k.length;
24158        for(i=0;i<len;i+=1){
24159            data.ks.or.k[i].to = null;
24160            data.ks.or.k[i].ti = null;
24161        }
24162    }
24163    this.or = getProp(this,data.ks.or,1,degToRads,this);
24164    this.or.sh = true;
24165    this.rx = getProp(this,data.ks.rx,0,degToRads,this);
24166    this.ry = getProp(this,data.ks.ry,0,degToRads,this);
24167    this.rz = getProp(this,data.ks.rz,0,degToRads,this);
24168    this.mat = new Matrix();
24169    this._prevMat = new Matrix();
24170    this._isFirstFrame = true;
24171    
24172    // TODO: find a better way to make the HCamera element to be compatible with the LayerInterface and TransformInterface.
24173    this.finalTransform = {
24174        mProp: this
24175    };
24176}
24177extendPrototype([BaseElement, FrameElement, HierarchyElement], HCameraElement);
24178
24179HCameraElement.prototype.setup = function() {
24180    var i, len = this.comp.threeDElements.length, comp;
24181    for(i=0;i<len;i+=1){
24182        //[perspectiveElem,container]
24183        comp = this.comp.threeDElements[i];
24184        if(comp.type === '3d') {
24185            comp.perspectiveElem.style.perspective = comp.perspectiveElem.style.webkitPerspective = this.pe.v+'px';
24186            comp.container.style.transformOrigin = comp.container.style.mozTransformOrigin = comp.container.style.webkitTransformOrigin = "0px 0px 0px";
24187            comp.perspectiveElem.style.transform = comp.perspectiveElem.style.webkitTransform = 'matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)';
24188        }
24189    }
24190};
24191
24192HCameraElement.prototype.createElements = function(){
24193};
24194
24195HCameraElement.prototype.hide = function(){
24196};
24197
24198HCameraElement.prototype.renderFrame = function(){
24199    var _mdf = this._isFirstFrame;
24200    var i, len;
24201    if(this.hierarchy){
24202        len = this.hierarchy.length;
24203        for(i=0;i<len;i+=1){
24204            _mdf = this.hierarchy[i].finalTransform.mProp._mdf || _mdf;
24205        }
24206    }
24207    if(_mdf || this.pe._mdf || (this.p && this.p._mdf) || (this.px && (this.px._mdf || this.py._mdf || this.pz._mdf)) || this.rx._mdf || this.ry._mdf || this.rz._mdf || this.or._mdf || (this.a && this.a._mdf)) {
24208        this.mat.reset();
24209
24210        if(this.hierarchy){
24211            var mat;
24212            len = this.hierarchy.length - 1;
24213            for (i = len; i >= 0; i -= 1) {
24214                var mTransf = this.hierarchy[i].finalTransform.mProp;
24215                this.mat.translate(-mTransf.p.v[0],-mTransf.p.v[1],mTransf.p.v[2]);
24216                this.mat.rotateX(-mTransf.or.v[0]).rotateY(-mTransf.or.v[1]).rotateZ(mTransf.or.v[2]);
24217                this.mat.rotateX(-mTransf.rx.v).rotateY(-mTransf.ry.v).rotateZ(mTransf.rz.v);
24218                this.mat.scale(1/mTransf.s.v[0],1/mTransf.s.v[1],1/mTransf.s.v[2]);
24219                this.mat.translate(mTransf.a.v[0],mTransf.a.v[1],mTransf.a.v[2]);
24220            }
24221        }
24222        if (this.p) {
24223            this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]);
24224        } else {
24225            this.mat.translate(-this.px.v,-this.py.v,this.pz.v);
24226        }
24227        if (this.a) {
24228            var diffVector
24229            if (this.p) {
24230                diffVector = [this.p.v[0] - this.a.v[0], this.p.v[1] - this.a.v[1], this.p.v[2] - this.a.v[2]];
24231            } else {
24232                diffVector = [this.px.v - this.a.v[0], this.py.v - this.a.v[1], this.pz.v - this.a.v[2]];
24233            }
24234            var mag = Math.sqrt(Math.pow(diffVector[0],2)+Math.pow(diffVector[1],2)+Math.pow(diffVector[2],2));
24235            //var lookDir = getNormalizedPoint(getDiffVector(this.a.v,this.p.v));
24236            var lookDir = [diffVector[0]/mag,diffVector[1]/mag,diffVector[2]/mag];
24237            var lookLengthOnXZ = Math.sqrt( lookDir[2]*lookDir[2] + lookDir[0]*lookDir[0] );
24238            var m_rotationX = (Math.atan2( lookDir[1], lookLengthOnXZ ));
24239            var m_rotationY = (Math.atan2( lookDir[0], -lookDir[2]));
24240            this.mat.rotateY(m_rotationY).rotateX(-m_rotationX);
24241
24242        }
24243        this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v);
24244        this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]);
24245        this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0);
24246        this.mat.translate(0,0,this.pe.v);
24247
24248
24249        
24250
24251        var hasMatrixChanged = !this._prevMat.equals(this.mat);
24252        if((hasMatrixChanged || this.pe._mdf) && this.comp.threeDElements) {
24253            len = this.comp.threeDElements.length;
24254            var comp;
24255            for(i=0;i<len;i+=1){
24256                comp = this.comp.threeDElements[i];
24257                if(comp.type === '3d') {
24258                    if(hasMatrixChanged) {
24259                        comp.container.style.transform = comp.container.style.webkitTransform = this.mat.toCSS();
24260                    }
24261                    if(this.pe._mdf) {
24262                        comp.perspectiveElem.style.perspective = comp.perspectiveElem.style.webkitPerspective = this.pe.v+'px';
24263                    }
24264                }
24265            }
24266            this.mat.clone(this._prevMat);
24267        }
24268    }
24269    this._isFirstFrame = false;
24270};
24271
24272HCameraElement.prototype.prepareFrame = function(num) {
24273    this.prepareProperties(num, true);
24274};
24275
24276HCameraElement.prototype.destroy = function(){
24277};
24278HCameraElement.prototype.getBaseElement = function(){return null;};
24279function HEffects() {
24280}
24281HEffects.prototype.renderFrame = function(){};
24282var animationManager = (function(){
24283    var moduleOb = {};
24284    var registeredAnimations = [];
24285    var initTime = 0;
24286    var len = 0;
24287    var playingAnimationsNum = 0;
24288    var _stopped = true;
24289    var _isFrozen = false;
24290
24291    function removeElement(ev){
24292        var i = 0;
24293        var animItem = ev.target;
24294        while(i<len) {
24295            if (registeredAnimations[i].animation === animItem) {
24296                registeredAnimations.splice(i, 1);
24297                i -= 1;
24298                len -= 1;
vendor: 6,335 bytes, lines 24299-24520
24299                if(!animItem.isPaused){
24300                    subtractPlayingCount();
24301                }
24302            }
24303            i += 1;
24304        }
24305    }
24306
24307    function registerAnimation(element, animationData){
24308        if(!element){
24309            return null;
24310        }
24311        var i=0;
24312        while(i<len){
24313            if(registeredAnimations[i].elem == element && registeredAnimations[i].elem !== null ){
24314                return registeredAnimations[i].animation;
24315            }
24316            i+=1;
24317        }
24318        var animItem = new AnimationItem();
24319        setupAnimation(animItem, element);
24320        animItem.setData(element, animationData);
24321        return animItem;
24322    }
24323
24324    function getRegisteredAnimations() {
24325        var i, len = registeredAnimations.length;
24326        var animations = [];
24327        for(i = 0; i < len; i += 1) {
24328            animations.push(registeredAnimations[i].animation);
24329        }
24330        return animations;
24331    }
24332
24333    function addPlayingCount(){
24334        playingAnimationsNum += 1;
24335        activate();
24336    }
24337
24338    function subtractPlayingCount(){
24339        playingAnimationsNum -= 1;
24340    }
24341
24342    function setupAnimation(animItem, element){
24343        animItem.addEventListener('destroy',removeElement);
24344        animItem.addEventListener('_active',addPlayingCount);
24345        animItem.addEventListener('_idle',subtractPlayingCount);
24346        registeredAnimations.push({elem: element,animation:animItem});
24347        len += 1;
24348    }
24349
24350    function loadAnimation(params){
24351        var animItem = new AnimationItem();
24352        setupAnimation(animItem, null);
24353        animItem.setParams(params);
24354        return animItem;
24355    }
24356
24357
24358    function setSpeed(val,animation){
24359        var i;
24360        for(i=0;i<len;i+=1){
24361            registeredAnimations[i].animation.setSpeed(val, animation);
24362        }
24363    }
24364
24365    function setDirection(val, animation){
24366        var i;
24367        for(i=0;i<len;i+=1){
24368            registeredAnimations[i].animation.setDirection(val, animation);
24369        }
24370    }
24371
24372    function play(animation){
24373        var i;
24374        for(i=0;i<len;i+=1){
24375            registeredAnimations[i].animation.play(animation);
24376        }
24377    }
24378    function resume(nowTime) {
24379        var elapsedTime = nowTime - initTime;
24380        var i;
24381        for(i=0;i<len;i+=1){
24382            registeredAnimations[i].animation.advanceTime(elapsedTime);
24383        }
24384        initTime = nowTime;
24385        if(playingAnimationsNum && !_isFrozen) {
24386            window.requestAnimationFrame(resume);
24387        } else {
24388            _stopped = true;
24389        }
24390    }
24391
24392    function first(nowTime){
24393        initTime = nowTime;
24394        window.requestAnimationFrame(resume);
24395    }
24396
24397    function pause(animation) {
24398        var i;
24399        for(i=0;i<len;i+=1){
24400            registeredAnimations[i].animation.pause(animation);
24401        }
24402    }
24403
24404    function goToAndStop(value,isFrame,animation) {
24405        var i;
24406        for(i=0;i<len;i+=1){
24407            registeredAnimations[i].animation.goToAndStop(value,isFrame,animation);
24408        }
24409    }
24410
24411    function stop(animation) {
24412        var i;
24413        for(i=0;i<len;i+=1){
24414            registeredAnimations[i].animation.stop(animation);
24415        }
24416    }
24417
24418    function togglePause(animation) {
24419        var i;
24420        for(i=0;i<len;i+=1){
24421            registeredAnimations[i].animation.togglePause(animation);
24422        }
24423    }
24424
24425    function destroy(animation) {
24426        var i;
24427        for(i=(len-1);i>=0;i-=1){
24428            registeredAnimations[i].animation.destroy(animation);
24429        }
24430    }
24431
24432    function searchAnimations(animationData, standalone, renderer){
24433        var animElements = [].concat([].slice.call(document.getElementsByClassName('lottie')),
24434                  [].slice.call(document.getElementsByClassName('bodymovin')));
24435        var i, len = animElements.length;
24436        for(i=0;i<len;i+=1){
24437            if(renderer){
24438                animElements[i].setAttribute('data-bm-type',renderer);
24439            }
24440            registerAnimation(animElements[i], animationData);
24441        }
24442        if(standalone && len === 0){
24443            if(!renderer){
24444                renderer = 'svg';
24445            }
24446            var body = document.getElementsByTagName('body')[0];
24447            body.innerHTML = '';
24448            var div = createTag('div');
24449            div.style.width = '100%';
24450            div.style.height = '100%';
24451            div.setAttribute('data-bm-type',renderer);
24452            body.appendChild(div);
24453            registerAnimation(div, animationData);
24454        }
24455    }
24456
24457    function resize(){
24458        var i;
24459        for(i=0;i<len;i+=1){
24460            registeredAnimations[i].animation.resize();
24461        }
24462    }
24463
24464    function activate(){
24465        if(!_isFrozen && playingAnimationsNum){
24466            if(_stopped) {
24467                window.requestAnimationFrame(first);
24468                _stopped = false;
24469            }
24470        }
24471    }
24472
24473    function freeze() {
24474        _isFrozen = true;
24475    }
24476
24477    function unfreeze() {
24478        _isFrozen = false;
24479        activate();
24480    }
24481
24482    moduleOb.registerAnimation = registerAnimation;
24483    moduleOb.loadAnimation = loadAnimation;
24484    moduleOb.setSpeed = setSpeed;
24485    moduleOb.setDirection = setDirection;
24486    moduleOb.play = play;
24487    moduleOb.pause = pause;
24488    moduleOb.stop = stop;
24489    moduleOb.togglePause = togglePause;
24490    moduleOb.searchAnimations = searchAnimations;
24491    moduleOb.resize = resize;
24492    //moduleOb.start = start;
24493    moduleOb.goToAndStop = goToAndStop;
24494    moduleOb.destroy = destroy;
24495    moduleOb.freeze = freeze;
24496    moduleOb.unfreeze = unfreeze;
24497    moduleOb.getRegisteredAnimations = getRegisteredAnimations;
24498    return moduleOb;
24499}());
24500
24501var AnimationItem = function () {
24502    this._cbs = [];
24503    this.name = '';
24504    this.path = '';
24505    this.isLoaded = false;
24506    this.currentFrame = 0;
24507    this.currentRawFrame = 0;
24508    this.totalFrames = 0;
24509    this.frameRate = 0;
24510    this.frameMult = 0;
24511    this.playSpeed = 1;
24512    this.playDirection = 1;
24513    this.playCount = 0;
24514    this.animationData = {};
24515    this.assets = [];
24516    this.isPaused = true;
24517    this.autoplay = false;
24518    this.loop = true;
24519    this.renderer = null;
24520    this.animationID = createElementID();
24521    this.assetsPath = '';
24522    this.timeCompleted = 0;
24523    this.segmentPos = 0;
24524    this.subframeEnabled = subframeEnabled;
24525    this.segments = [];
24526    this._idle = true;
24527    this._completedLoop = false;
24528    this.projectInterface = ProjectInterface();
24529    this.imagePreloader = new ImagePreloader();
24530};
24531
24532extendPrototype([BaseEvent], AnimationItem);
24533
24534AnimationItem.prototype.setParams = function(params) {
24535    if(params.context){
24536        this.context = params.context;
24537    }
24538    if(params.wrapper || params.container){
24539        this.wrapper = params.wrapper || params.container;
24540    }
24541    var animType = params.animType ? params.animType : params.renderer ? params.renderer : 'svg';
24542    switch(animType){
24543        case 'canvas':
24544            this.renderer = new CanvasRenderer(this, params.rendererSettings);
24545            break;
24546        case 'svg':
24547            this.renderer = new SVGRenderer(this, params.rendererSettings);
24548            break;
24549        default:
24550            this.renderer = new HybridRenderer(this, params.rendererSettings);
24551            break;
24552    }
24553    this.renderer.setProjectInterface(this.projectInterface);
24554    this.animType = animType;
24555
24556    if(params.loop === '' || params.loop === null){
24557    }else if(params.loop === false){
24558        this.loop = false;
24559    }else if(params.loop === true){
24560        this.loop = true;
24561    }else{
24562        this.loop = parseInt(params.loop);
24563    }
24564    this.autoplay = 'autoplay' in params ? params.autoplay : true;
24565    this.name = params.name ? params.name :  '';
24566    this.autoloadSegments = params.hasOwnProperty('autoloadSegments') ? params.autoloadSegments :  true;
24567    this.assetsPath = params.assetsPath;
24568    if (params.animationData) {
24569        this.configAnimation(params.animationData);
24570    } else if(params.path){
24571
24572        if( params.path.lastIndexOf('\\') !== -1){
24573            this.path = params.path.substr(0,params.path.lastIndexOf('\\')+1);
24574        } else {
24575            this.path = params.path.substr(0,params.path.lastIndexOf('/')+1);
24576        }
24577        this.fileName = params.path.substr(params.path.lastIndexOf('/')+1);
24578        this.fileName = this.fileName.substr(0,this.fileName.lastIndexOf('.json'));
24579
24580        assetLoader.load(params.path, this.configAnimation.bind(this), function() {
24581            this.trigger('data_failed');
24582        }.bind(this));
24583    }
24584};
24585
24586AnimationItem.prototype.setData = function (wrapper, animationData) {
24587    var params = {
24588        wrapper: wrapper,
24589        animationData: animationData ? (typeof animationData  === "object") ? animationData : JSON.parse(animationData) : null
24590    };
24591    var wrapperAttributes = wrapper.attributes;
24592
24593    params.path = wrapperAttributes.getNamedItem('data-animation-path') ? wrapperAttributes.getNamedItem('data-animation-path').value : wrapperAttributes.getNamedItem('data-bm-path') ? wrapperAttributes.getNamedItem('data-bm-path').value :  wrapperAttributes.getNamedItem('bm-path') ? wrapperAttributes.getNamedItem('bm-path').value : '';
24594    params.animType = wrapperAttributes.getNamedItem('data-anim-type') ? wrapperAttributes.getNamedItem('data-anim-type').value : wrapperAttributes.getNamedItem('data-bm-type') ? wrapperAttributes.getNamedItem('data-bm-type').value : wrapperAttributes.getNamedItem('bm-type') ? wrapperAttributes.getNamedItem('bm-type').value :  wrapperAttributes.getNamedItem('data-bm-renderer') ? wrapperAttributes.getNamedItem('data-bm-renderer').value : wrapperAttributes.getNamedItem('bm-renderer') ? wrapperAttributes.getNamedItem('bm-renderer').value : 'canvas';
24595
24596    var loop = wrapperAttributes.getNamedItem('data-anim-loop') ? wrapperAttributes.getNamedItem('data-anim-loop').value :  wrapperAttributes.getNamedItem('data-bm-loop') ? wrapperAttributes.getNamedItem('data-bm-loop').value :  wrapperAttributes.getNamedItem('bm-loop') ? wrapperAttributes.getNamedItem('bm-loop').value : '';
24597    if(loop === ''){
24598    }else if(loop === 'false'){
24599        params.loop = false;
24600    }else if(loop === 'true'){
24601        params.loop = true;
24602    }else{
24603        params.loop = parseInt(loop);
24604    }
24605    var autoplay = wrapperAttributes.getNamedItem('data-anim-autoplay') ? wrapperAttributes.getNamedItem('data-anim-autoplay').value :  wrapperAttributes.getNamedItem('data-bm-autoplay') ? wrapperAttributes.getNamedItem('data-bm-autoplay').value :  wrapperAttributes.getNamedItem('bm-autoplay') ? wrapperAttributes.getNamedItem('bm-autoplay').value : true;
24606    params.autoplay = autoplay !== "false";
24607
24608    params.name = wrapperAttributes.getNamedItem('data-name') ? wrapperAttributes.getNamedItem('data-name').value :  wrapperAttributes.getNamedItem('data-bm-name') ? wrapperAttributes.getNamedItem('data-bm-name').value : wrapperAttributes.getNamedItem('bm-name') ? wrapperAttributes.getNamedItem('bm-name').value :  '';
24609    var prerender = wrapperAttributes.getNamedItem('data-anim-prerender') ? wrapperAttributes.getNamedItem('data-anim-prerender').value :  wrapperAttributes.getNamedItem('data-bm-prerender') ? wrapperAttributes.getNamedItem('data-bm-prerender').value :  wrapperAttributes.getNamedItem('bm-prerender') ? wrapperAttributes.getNamedItem('bm-prerender').value : '';
24610
24611    if(prerender === 'false'){
24612        params.prerender = false;
24613    }
24614    this.setParams(params);
24615};
24616
24617AnimationItem.prototype.includeLayers = function(data) {
24618    if(data.op > this.animationData.op){
24619        this.animationData.op = data.op;
24620        this.totalFrames = Math.floor(data.op - this.animationData.ip);
24621    }
24622    var layers = this.animationData.layers;
24623    var i, len = layers.length;
24624    var newLayers = data.layers;
24625    var j, jLen = newLayers.length;
24626    for(j=0;j<jLen;j+=1){
24627        i = 0;
24628        while(i<len){
24629            if(layers[i].id == newLayers[j].id){
24630                layers[i] = newLayers[j];
24631                break;
24632            }
24633            i += 1;
24634        }
24635    }
24636    if(data.chars || data.fonts){
24637        this.renderer.globalData.fontManager.addChars(data.chars);
24638        this.renderer.globalData.fontManager.addFonts(data.fonts, this.renderer.globalData.defs);
24639    }
24640    if(data.assets){
24641        len = data.assets.length;
24642        for(i = 0; i < len; i += 1){
24643            this.animationData.assets.push(data.assets[i]);
24644        }
24645    }
24646    this.animationData.__complete = false;
24647    dataManager.completeData(this.animationData,this.renderer.globalData.fontManager);
24648    this.renderer.includeLayers(data.layers);
24649    if(expressionsPlugin){
24650        expressionsPlugin.initExpressions(this);
24651    }
24652    this.loadNextSegment();
24653};
24654
24655AnimationItem.prototype.loadNextSegment = function() {
24656    var segments = this.animationData.segments;
24657    if(!segments || segments.length === 0 || !this.autoloadSegments){
24658        this.trigger('data_ready');
24659        this.timeCompleted = this.totalFrames;
24660        return;
24661    }
24662    var segment = segments.shift();
24663    this.timeCompleted = segment.time * this.frameRate;
24664    var segmentPath = this.path+this.fileName+'_' + this.segmentPos + '.json';
24665    this.segmentPos += 1;
24666    assetLoader.load(segmentPath, this.includeLayers.bind(this), function() {
24667        this.trigger('data_failed');
24668    }.bind(this));
24669};
24670
24671AnimationItem.prototype.loadSegments = function() {
24672    var segments = this.animationData.segments;
24673    if(!segments) {
24674        this.timeCompleted = this.totalFrames;
24675    }
24676    this.loadNextSegment();
24677};
24678
24679AnimationItem.prototype.imagesLoaded = function() {
24680    this.trigger('loaded_images');
24681    this.checkLoaded()
24682}
24683
24684AnimationItem.prototype.preloadImages = function() {
24685    this.imagePreloader.setAssetsPath(this.assetsPath);
24686    this.imagePreloader.setPath(this.path);
24687    this.imagePreloader.loadAssets(this.animationData.assets, this.imagesLoaded.bind(this));
24688}
24689
24690AnimationItem.prototype.configAnimation = function (animData) {
24691    if(!this.renderer){
24692        return;
24693    }
24694    try {
24695        this.animationData = animData;
24696        this.totalFrames = Math.floor(this.animationData.op - this.animationData.ip);
24697        this.renderer.configAnimation(animData);
24698        if(!animData.assets){
24699            animData.assets = [];
24700        }
24701
24702        this.assets = this.animationData.assets;
24703        this.frameRate = this.animationData.fr;
24704        this.firstFrame = Math.round(this.animationData.ip);
24705        this.frameMult = this.animationData.fr / 1000;
24706        this.renderer.searchExtraCompositions(animData.assets);
24707        this.trigger('config_ready');
24708        this.preloadImages();
24709        this.loadSegments();
24710        this.updaFrameModifier();
24711        this.waitForFontsLoaded();
24712    } catch(error) {
24713        this.triggerConfigError(error);
24714    }
24715};
24716
24717AnimationItem.prototype.waitForFontsLoaded = function(){
24718    if(!this.renderer) {
24719        return;
24720    }
24721    if(this.renderer.globalData.fontManager.loaded()){
24722        this.checkLoaded();
24723    }else{
24724        setTimeout(this.waitForFontsLoaded.bind(this),20);
24725    }
24726}
24727
24728AnimationItem.prototype.checkLoaded = function () {
24729    if (!this.isLoaded && this.renderer.globalData.fontManager.loaded() && (this.imagePreloader.loaded() || this.renderer.rendererType !== 'canvas')) {
24730        this.isLoaded = true;
24731        dataManager.completeData(this.animationData, this.renderer.globalData.fontManager);
24732        if(expressionsPlugin){
24733            expressionsPlugin.initExpressions(this);
24734        }
24735        this.renderer.initItems();
24736        setTimeout(function() {
24737            this.trigger('DOMLoaded');
24738        }.bind(this), 0);
24739        this.gotoFrame();
24740        if(this.autoplay){
24741            this.play();
24742        }
24743    }
24744};
24745
24746AnimationItem.prototype.resize = function () {
24747    this.renderer.updateContainerSize();
24748};
24749
24750AnimationItem.prototype.setSubframe = function(flag){
24751    this.subframeEnabled = flag ? true : false;
24752};
24753
24754AnimationItem.prototype.gotoFrame = function () {
24755    this.currentFrame = this.subframeEnabled ? this.currentRawFrame : ~~this.currentRawFrame;
24756
24757    if(this.timeCompleted !== this.totalFrames && this.currentFrame > this.timeCompleted){
24758        this.currentFrame = this.timeCompleted;
24759    }
24760    this.trigger('enterFrame');
24761    this.renderFrame();
24762};
24763
24764AnimationItem.prototype.renderFrame = function () {
24765    if(this.isLoaded === false){
24766        return;
24767    }
24768    try {
24769        this.renderer.renderFrame(this.currentFrame + this.firstFrame);
24770    } catch(error) {
24771        this.triggerRenderFrameError(error);
24772    }
24773};
24774
24775AnimationItem.prototype.play = function (name) {
24776    if(name && this.name != name){
24777        return;
24778    }
24779    if(this.isPaused === true){
24780        this.isPaused = false;
24781        if(this._idle){
24782            this._idle = false;
24783            this.trigger('_active');
24784        }
24785    }
24786};
24787
24788AnimationItem.prototype.pause = function (name) {
24789    if(name && this.name != name){
24790        return;
24791    }
24792    if(this.isPaused === false){
24793        this.isPaused = true;
24794        this._idle = true;
24795        this.trigger('_idle');
24796    }
24797};
24798
24799AnimationItem.prototype.togglePause = function (name) {
24800    if(name && this.name != name){
24801        return;
24802    }
24803    if(this.isPaused === true){
24804        this.play();
24805    }else{
24806        this.pause();
24807    }
24808};
24809
24810AnimationItem.prototype.stop = function (name) {
24811    if(name && this.name != name){
24812        return;
24813    }
24814    this.pause();
24815    this.playCount = 0;
24816    this._completedLoop = false;
24817    this.setCurrentRawFrameValue(0);
24818};
24819
24820AnimationItem.prototype.goToAndStop = function (value, isFrame, name) {
24821    if(name && this.name != name){
24822        return;
24823    }
24824    if(isFrame){
24825        this.setCurrentRawFrameValue(value);
24826    }else{
24827        this.setCurrentRawFrameValue(value * this.frameModifier);
24828    }
24829    this.pause();
24830};
24831
24832AnimationItem.prototype.goToAndPlay = function (value, isFrame, name) {
24833    this.goToAndStop(value, isFrame, name);
24834    this.play();
24835};
24836
24837AnimationItem.prototype.advanceTime = function (value) {
24838    if (this.isPaused === true || this.isLoaded === false) {
24839        return;
24840    }
24841    var nextValue = this.currentRawFrame + value * this.frameModifier;
24842    var _isComplete = false;
24843    // Checking if nextValue > totalFrames - 1 for addressing non looping and looping animations.
24844    // If animation won't loop, it should stop at totalFrames - 1. If it will loop it should complete the last frame and then loop.
vendor: 51,701 bytes, lines 24845-26270
24845    if (nextValue >= this.totalFrames - 1 && this.frameModifier > 0) {
24846        if (!this.loop || this.playCount === this.loop) {
24847            if (!this.checkSegments(nextValue >  this.totalFrames ? nextValue % this.totalFrames : 0)) {
24848                _isComplete = true;
24849                nextValue = this.totalFrames - 1;
24850            }
24851        } else if (nextValue >= this.totalFrames) {
24852            this.playCount += 1;
24853            if (!this.checkSegments(nextValue % this.totalFrames)) {
24854                this.setCurrentRawFrameValue(nextValue % this.totalFrames);
24855                this._completedLoop = true;
24856                this.trigger('loopComplete');
24857            }
24858        } else {
24859            this.setCurrentRawFrameValue(nextValue);
24860        }
24861    } else if(nextValue < 0) {
24862        if (!this.checkSegments(nextValue % this.totalFrames)) {
24863            if (this.loop && !(this.playCount-- <= 0 && this.loop !== true)) {
24864                this.setCurrentRawFrameValue(this.totalFrames + (nextValue % this.totalFrames));
24865                if(!this._completedLoop) {
24866                    this._completedLoop = true;
24867                } else {
24868                    this.trigger('loopComplete');
24869                }
24870            } else {
24871                _isComplete = true;
24872                nextValue = 0;
24873            }
24874        }
24875    } else {
24876        this.setCurrentRawFrameValue(nextValue);
24877    }
24878    if (_isComplete) {
24879        this.setCurrentRawFrameValue(nextValue);
24880        this.pause();
24881        this.trigger('complete');
24882    }
24883};
24884
24885AnimationItem.prototype.adjustSegment = function(arr, offset){
24886    this.playCount = 0;
24887    if(arr[1] < arr[0]){
24888        if(this.frameModifier > 0){
24889            if(this.playSpeed < 0){
24890                this.setSpeed(-this.playSpeed);
24891            } else {
24892                this.setDirection(-1);
24893            }
24894        }
24895        this.timeCompleted = this.totalFrames = arr[0] - arr[1];
24896        this.firstFrame = arr[1];
24897        this.setCurrentRawFrameValue(this.totalFrames - 0.001 - offset);
24898    } else if(arr[1] > arr[0]){
24899        if(this.frameModifier < 0){
24900            if(this.playSpeed < 0){
24901                this.setSpeed(-this.playSpeed);
24902            } else {
24903                this.setDirection(1);
24904            }
24905        }
24906        this.timeCompleted = this.totalFrames = arr[1] - arr[0];
24907        this.firstFrame = arr[0];
24908        this.setCurrentRawFrameValue(0.001 + offset);
24909    }
24910    this.trigger('segmentStart');
24911};
24912AnimationItem.prototype.setSegment = function (init,end) {
24913    var pendingFrame = -1;
24914    if(this.isPaused) {
24915        if (this.currentRawFrame + this.firstFrame < init) {
24916            pendingFrame = init;
24917        } else if (this.currentRawFrame + this.firstFrame > end) {
24918            pendingFrame = end - init;
24919        }
24920    }
24921
24922    this.firstFrame = init;
24923    this.timeCompleted = this.totalFrames = end - init;
24924    if(pendingFrame !== -1) {
24925        this.goToAndStop(pendingFrame,true);
24926    }
24927};
24928
24929AnimationItem.prototype.playSegments = function (arr, forceFlag) {
24930    if (forceFlag) {
24931        this.segments.length = 0;
24932    }
24933    if (typeof arr[0] === 'object') {
24934        var i, len = arr.length;
24935        for (i = 0; i < len; i += 1) {
24936            this.segments.push(arr[i]);
24937        }
24938    } else {
24939        this.segments.push(arr);
24940    }
24941    if (this.segments.length && forceFlag) {
24942        this.adjustSegment(this.segments.shift(), 0);
24943    }
24944    if (this.isPaused) {
24945        this.play();
24946    }
24947};
24948
24949AnimationItem.prototype.resetSegments = function (forceFlag) {
24950    this.segments.length = 0;
24951    this.segments.push([this.animationData.ip,this.animationData.op]);
24952    //this.segments.push([this.animationData.ip*this.frameRate,Math.floor(this.animationData.op - this.animationData.ip+this.animationData.ip*this.frameRate)]);
24953    if (forceFlag) {
24954        this.checkSegments(0);
24955    }
24956};
24957AnimationItem.prototype.checkSegments = function(offset) {
24958    if (this.segments.length) {
24959        this.adjustSegment(this.segments.shift(), offset);
24960        return true;
24961    }
24962    return false;
24963};
24964
24965AnimationItem.prototype.destroy = function (name) {
24966    if ((name && this.name != name) || !this.renderer) {
24967        return;
24968    }
24969    this.renderer.destroy();
24970    this.imagePreloader.destroy();
24971    this.trigger('destroy');
24972    this._cbs = null;
24973    this.onEnterFrame = this.onLoopComplete = this.onComplete = this.onSegmentStart = this.onDestroy = null;
24974    this.renderer = null;
24975};
24976
24977AnimationItem.prototype.setCurrentRawFrameValue = function(value){
24978    this.currentRawFrame = value;
24979    this.gotoFrame();
24980};
24981
24982AnimationItem.prototype.setSpeed = function (val) {
24983    this.playSpeed = val;
24984    this.updaFrameModifier();
24985};
24986
24987AnimationItem.prototype.setDirection = function (val) {
24988    this.playDirection = val < 0 ? -1 : 1;
24989    this.updaFrameModifier();
24990};
24991
24992AnimationItem.prototype.updaFrameModifier = function () {
24993    this.frameModifier = this.frameMult * this.playSpeed * this.playDirection;
24994};
24995
24996AnimationItem.prototype.getPath = function () {
24997    return this.path;
24998};
24999
25000AnimationItem.prototype.getAssetsPath = function (assetData) {
25001    var path = '';
25002    if(assetData.e) {
25003        path = assetData.p;
25004    } else if(this.assetsPath){
25005        var imagePath = assetData.p;
25006        if(imagePath.indexOf('images/') !== -1){
25007            imagePath = imagePath.split('/')[1];
25008        }
25009        path = this.assetsPath + imagePath;
25010    } else {
25011        path = this.path;
25012        path += assetData.u ? assetData.u : '';
25013        path += assetData.p;
25014    }
25015    return path;
25016};
25017
25018AnimationItem.prototype.getAssetData = function (id) {
25019    var i = 0, len = this.assets.length;
25020    while (i < len) {
25021        if(id == this.assets[i].id){
25022            return this.assets[i];
25023        }
25024        i += 1;
25025    }
25026};
25027
25028AnimationItem.prototype.hide = function () {
25029    this.renderer.hide();
25030};
25031
25032AnimationItem.prototype.show = function () {
25033    this.renderer.show();
25034};
25035
25036AnimationItem.prototype.getDuration = function (isFrame) {
25037    return isFrame ? this.totalFrames : this.totalFrames / this.frameRate;
25038};
25039
25040AnimationItem.prototype.trigger = function(name){
25041    if(this._cbs && this._cbs[name]){
25042        switch(name){
25043            case 'enterFrame':
25044                this.triggerEvent(name,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameModifier));
25045                break;
25046            case 'loopComplete':
25047                this.triggerEvent(name,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
25048                break;
25049            case 'complete':
25050                this.triggerEvent(name,new BMCompleteEvent(name,this.frameMult));
25051                break;
25052            case 'segmentStart':
25053                this.triggerEvent(name,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
25054                break;
25055            case 'destroy':
25056                this.triggerEvent(name,new BMDestroyEvent(name,this));
25057                break;
25058            default:
25059                this.triggerEvent(name);
25060        }
25061    }
25062    if(name === 'enterFrame' && this.onEnterFrame){
25063        this.onEnterFrame.call(this,new BMEnterFrameEvent(name,this.currentFrame,this.totalFrames,this.frameMult));
25064    }
25065    if(name === 'loopComplete' && this.onLoopComplete){
25066        this.onLoopComplete.call(this,new BMCompleteLoopEvent(name,this.loop,this.playCount,this.frameMult));
25067    }
25068    if(name === 'complete' && this.onComplete){
25069        this.onComplete.call(this,new BMCompleteEvent(name,this.frameMult));
25070    }
25071    if(name === 'segmentStart' && this.onSegmentStart){
25072        this.onSegmentStart.call(this,new BMSegmentStartEvent(name,this.firstFrame,this.totalFrames));
25073    }
25074    if(name === 'destroy' && this.onDestroy){
25075        this.onDestroy.call(this,new BMDestroyEvent(name,this));
25076    }
25077};
25078
25079AnimationItem.prototype.triggerRenderFrameError = function(nativeError) {
25080
25081    var error = new BMRenderFrameErrorEvent(nativeError, this.currentFrame);
25082    this.triggerEvent('error', error);
25083
25084    if (this.onError) {
25085        this.onError.call(this, error);
25086    }
25087}
25088
25089AnimationItem.prototype.triggerConfigError = function(nativeError) {
25090
25091    var error = new BMConfigErrorEvent(nativeError, this.currentFrame);
25092    this.triggerEvent('error', error);
25093
25094    if (this.onError) {
25095        this.onError.call(this, error);
25096    }
25097}
25098var Expressions = (function(){
25099    var ob = {};
25100    ob.initExpressions = initExpressions;
25101
25102
25103    function initExpressions(animation){
25104
25105    	var stackCount = 0;
25106    	var registers = [];
25107
25108    	function pushExpression() {
25109			stackCount += 1;
25110    	}
25111
25112    	function popExpression() {
25113			stackCount -= 1;
25114			if (stackCount === 0) {
25115				releaseInstances();
25116			}
25117    	}
25118
25119    	function registerExpressionProperty(expression) {
25120    		if (registers.indexOf(expression) === -1) {
25121				registers.push(expression)
25122    		}
25123    	}
25124
25125    	function releaseInstances() {
25126    		var i, len = registers.length;
25127    		for (i = 0; i < len; i += 1) {
25128				registers[i].release();
25129    		}
25130    		registers.length = 0;
25131    	}
25132
25133        animation.renderer.compInterface = CompExpressionInterface(animation.renderer);
25134        animation.renderer.globalData.projectInterface.registerComposition(animation.renderer);
25135        animation.renderer.globalData.pushExpression = pushExpression;
25136        animation.renderer.globalData.popExpression = popExpression;
25137        animation.renderer.globalData.registerExpressionProperty = registerExpressionProperty;
25138    }
25139   return ob;
25140}());
25141
25142expressionsPlugin = Expressions;
25143
25144var ExpressionManager = (function(){
25145    'use strict';
25146    var ob = {};
25147    var Math = BMMath;
25148    var window = null;
25149    var document = null;
25150
25151    function $bm_isInstanceOfArray(arr) {
25152        return arr.constructor === Array || arr.constructor === Float32Array;
25153    }
25154
25155    function isNumerable(tOfV, v) {
25156        return tOfV === 'number' || tOfV === 'boolean' || tOfV === 'string' || v instanceof Number;
25157    }
25158
25159    function $bm_neg(a){
25160        var tOfA = typeof a;
25161        if(tOfA === 'number' || tOfA === 'boolean'  || a instanceof Number ){
25162            return -a;
25163        }
25164        if($bm_isInstanceOfArray(a)){
25165            var i, lenA = a.length;
25166            var retArr = [];
25167            for(i=0;i<lenA;i+=1){
25168                retArr[i] = -a[i];
25169            }
25170            return retArr;
25171        }
25172        if (a.propType) {
25173            return a.v;
25174        }
25175    }
25176
25177    var easeInBez = BezierFactory.getBezierEasing(0.333,0,.833,.833, 'easeIn').get;
25178    var easeOutBez = BezierFactory.getBezierEasing(0.167,0.167,.667,1, 'easeOut').get;
25179    var easeInOutBez = BezierFactory.getBezierEasing(.33,0,.667,1, 'easeInOut').get;
25180
25181    function sum(a,b) {
25182        var tOfA = typeof a;
25183        var tOfB = typeof b;
25184        if(tOfA === 'string' || tOfB === 'string'){
25185            return a + b;
25186        }
25187        if(isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
25188            return a + b;
25189        }
25190        if($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)){
25191            a = a.slice(0);
25192            a[0] = a[0] + b;
25193            return a;
25194        }
25195        if(isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)){
25196            b = b.slice(0);
25197            b[0] = a + b[0];
25198            return b;
25199        }
25200        if($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)){
25201            
25202            var i = 0, lenA = a.length, lenB = b.length;
25203            var retArr = [];
25204            while(i<lenA || i < lenB){
25205                if((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)){
25206                    retArr[i] = a[i] + b[i];
25207                }else{
25208                    retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
25209                }
25210                i += 1;
25211            }
25212            return retArr;
25213        }
25214        return 0;
25215    }
25216    var add = sum;
25217
25218    function sub(a,b) {
25219        var tOfA = typeof a;
25220        var tOfB = typeof b;
25221        if(isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
25222            if(tOfA === 'string') {
25223                a = parseInt(a);
25224            }
25225            if(tOfB === 'string') {
25226                b = parseInt(b);
25227            }
25228            return a - b;
25229        }
25230        if( $bm_isInstanceOfArray(a) && isNumerable(tOfB, b)){
25231            a = a.slice(0);
25232            a[0] = a[0] - b;
25233            return a;
25234        }
25235        if(isNumerable(tOfA, a) &&  $bm_isInstanceOfArray(b)){
25236            b = b.slice(0);
25237            b[0] = a - b[0];
25238            return b;
25239        }
25240        if($bm_isInstanceOfArray(a) && $bm_isInstanceOfArray(b)){
25241            var i = 0, lenA = a.length, lenB = b.length;
25242            var retArr = [];
25243            while(i<lenA || i < lenB){
25244                if((typeof a[i] === 'number' || a[i] instanceof Number) && (typeof b[i] === 'number' || b[i] instanceof Number)){
25245                    retArr[i] = a[i] - b[i];
25246                }else{
25247                    retArr[i] = b[i] === undefined ? a[i] : a[i] || b[i];
25248                }
25249                i += 1;
25250            }
25251            return retArr;
25252        }
25253        return 0;
25254    }
25255
25256    function mul(a,b) {
25257        var tOfA = typeof a;
25258        var tOfB = typeof b;
25259        var arr;
25260        if(isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
25261            return a * b;
25262        }
25263
25264        var i, len;
25265        if($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)){
25266            len = a.length;
25267            arr = createTypedArray('float32', len);
25268            for(i=0;i<len;i+=1){
25269                arr[i] = a[i] * b;
25270            }
25271            return arr;
25272        }
25273        if(isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)){
25274            len = b.length;
25275            arr = createTypedArray('float32', len);
25276            for(i=0;i<len;i+=1){
25277                arr[i] = a * b[i];
25278            }
25279            return arr;
25280        }
25281        return 0;
25282    }
25283
25284    function div(a,b) {
25285        var tOfA = typeof a;
25286        var tOfB = typeof b;
25287        var arr;
25288        if(isNumerable(tOfA, a) && isNumerable(tOfB, b)) {
25289            return a / b;
25290        }
25291        var i, len;
25292        if($bm_isInstanceOfArray(a) && isNumerable(tOfB, b)){
25293            len = a.length;
25294            arr = createTypedArray('float32', len);
25295            for(i=0;i<len;i+=1){
25296                arr[i] = a[i] / b;
25297            }
25298            return arr;
25299        }
25300        if(isNumerable(tOfA, a) && $bm_isInstanceOfArray(b)){
25301            len = b.length;
25302            arr = createTypedArray('float32', len);
25303            for(i=0;i<len;i+=1){
25304                arr[i] = a / b[i];
25305            }
25306            return arr;
25307        }
25308        return 0;
25309    }
25310    function mod(a,b) {
25311        if(typeof a === 'string') {
25312            a = parseInt(a);
25313        }
25314        if(typeof b === 'string') {
25315            b = parseInt(b);
25316        }
25317        return a % b;
25318    }
25319    var $bm_sum = sum;
25320    var $bm_sub = sub;
25321    var $bm_mul = mul;
25322    var $bm_div = div;
25323    var $bm_mod = mod;
25324
25325    function clamp(num, min, max) {
25326        if(min > max){
25327            var mm = max;
25328            max = min;
25329            min = mm;
25330        }
25331        return Math.min(Math.max(num, min), max);
25332    }
25333
25334    function radiansToDegrees(val) {
25335        return val/degToRads;
25336    }
25337    var radians_to_degrees = radiansToDegrees;
25338
25339    function degreesToRadians(val) {
25340        return val*degToRads;
25341    }
25342    var degrees_to_radians = radiansToDegrees;
25343
25344    var helperLengthArray = [0,0,0,0,0,0];
25345
25346    function length(arr1, arr2) {
25347        if (typeof arr1 === 'number' || arr1 instanceof Number) {
25348            arr2 = arr2 || 0;
25349            return Math.abs(arr1 - arr2);
25350        }
25351        if(!arr2) {
25352            arr2 = helperLengthArray;
25353        }
25354        var i, len = Math.min(arr1.length, arr2.length);
25355        var addedLength = 0;
25356        for (i = 0; i < len; i += 1) {
25357            addedLength += Math.pow(arr2[i] - arr1[i], 2);
25358        }
25359        return Math.sqrt(addedLength);
25360    }
25361
25362    function normalize(vec) {
25363        return div(vec, length(vec));
25364    }
25365
25366    function rgbToHsl(val) {
25367        var r = val[0]; var g = val[1]; var b = val[2];
25368        var max = Math.max(r, g, b), min = Math.min(r, g, b);
25369        var h, s, l = (max + min) / 2;
25370
25371        if(max == min){
25372            h = s = 0; // achromatic
25373        }else{
25374            var d = max - min;
25375            s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
25376            switch(max){
25377                case r: h = (g - b) / d + (g < b ? 6 : 0); break;
25378                case g: h = (b - r) / d + 2; break;
25379                case b: h = (r - g) / d + 4; break;
25380            }
25381            h /= 6;
25382        }
25383
25384        return [h, s, l,val[3]];
25385    }
25386
25387    function hue2rgb(p, q, t){
25388        if(t < 0) t += 1;
25389        if(t > 1) t -= 1;
25390        if(t < 1/6) return p + (q - p) * 6 * t;
25391        if(t < 1/2) return q;
25392        if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
25393        return p;
25394    }
25395
25396    function hslToRgb(val){
25397        var h = val[0];
25398        var s = val[1];
25399        var l = val[2];
25400
25401        var r, g, b;
25402
25403        if(s === 0){
25404            r = g = b = l; // achromatic
25405        }else{
25406
25407            var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
25408            var p = 2 * l - q;
25409            r = hue2rgb(p, q, h + 1/3);
25410            g = hue2rgb(p, q, h);
25411            b = hue2rgb(p, q, h - 1/3);
25412        }
25413
25414        return [r, g , b, val[3]];
25415    }
25416
25417    function linear(t, tMin, tMax, value1, value2){
25418        if(value1 === undefined || value2 === undefined){
25419            value1 = tMin;
25420            value2 = tMax;
25421            tMin = 0;
25422            tMax = 1;
25423        }
25424        if(tMax < tMin) {
25425            var _tMin = tMax;
25426            tMax = tMin;
25427            tMin = _tMin;
25428        }
25429        if(t <= tMin) {
25430            return value1;
25431        }else if(t >= tMax){
25432            return value2;
25433        }
25434        var perc = tMax === tMin ? 0 : (t-tMin)/(tMax-tMin);
25435        if(!value1.length){
25436            return value1 + (value2-value1)*perc;
25437        }
25438        var i, len = value1.length;
25439        var arr = createTypedArray('float32', len);
25440        for(i=0;i<len;i+=1){
25441            arr[i] = value1[i] + (value2[i]-value1[i])*perc;
25442        }
25443        return arr;
25444    }
25445    function random(min,max){
25446        if(max === undefined){
25447            if(min === undefined){
25448                min = 0;
25449                max = 1;
25450            } else {
25451                max = min;
25452                min = undefined;
25453            }
25454        }
25455        if(max.length){
25456            var i, len = max.length;
25457            if(!min){
25458                min = createTypedArray('float32', len);
25459            }
25460            var arr = createTypedArray('float32', len);
25461            var rnd = BMMath.random();
25462            for(i=0;i<len;i+=1){
25463                arr[i] = min[i] + rnd*(max[i]-min[i]);
25464            }
25465            return arr;
25466        }
25467        if(min === undefined){
25468            min = 0;
25469        }
25470        var rndm = BMMath.random();
25471        return min + rndm*(max-min);
25472    }
25473
25474    function createPath(points, inTangents, outTangents, closed) {
25475        var i, len = points.length;
25476        var path = shape_pool.newElement();
25477        path.setPathData(!!closed, len);
25478        var arrPlaceholder = [0,0], inVertexPoint, outVertexPoint;
25479        for(i = 0; i < len; i += 1) {
25480            inVertexPoint = (inTangents && inTangents[i]) ? inTangents[i] : arrPlaceholder;
25481            outVertexPoint = (outTangents && outTangents[i]) ? outTangents[i] : arrPlaceholder;
25482            path.setTripleAt(points[i][0],points[i][1],outVertexPoint[0] + points[i][0],outVertexPoint[1] + points[i][1],inVertexPoint[0] + points[i][0],inVertexPoint[1] + points[i][1],i,true);
25483        }
25484        return path;
25485    }
25486
25487    function initiateExpression(elem,data,property){
25488        var val = data.x;
25489        var needsVelocity = /velocity(?![\w\d])/.test(val);
25490        var _needsRandom = val.indexOf('random') !== -1;
25491        var elemType = elem.data.ty;
25492        var transform,$bm_transform,content,effect;
25493        var thisProperty = property;
25494        thisProperty.valueAtTime = thisProperty.getValueAtTime;
25495        Object.defineProperty(thisProperty, 'value', {
25496            get: function() {
25497                return thisProperty.v
25498            }
25499        })
25500        elem.comp.frameDuration = 1/elem.comp.globalData.frameRate;
25501        elem.comp.displayStartTime = 0;
25502        var inPoint = elem.data.ip/elem.comp.globalData.frameRate;
25503        var outPoint = elem.data.op/elem.comp.globalData.frameRate;
25504        var width = elem.data.sw ? elem.data.sw : 0;
25505        var height = elem.data.sh ? elem.data.sh : 0;
25506        var name = elem.data.nm;
25507        var loopIn, loop_in, loopOut, loop_out, smooth;
25508        var toWorld,fromWorld,fromComp,toComp,fromCompToSurface, position, rotation, anchorPoint, scale, thisLayer, thisComp,mask,valueAtTime,velocityAtTime;
25509        var __expression_functions = [];
25510        if(data.xf) {
25511            var i, len = data.xf.length;
25512            for(i = 0; i < len; i += 1) {
25513                __expression_functions[i] = eval('(function(){ return ' + data.xf[i] + '}())');
25514            }
25515        }
25516
25517        var scoped_bm_rt;
25518        var expression_function = eval('[function _expression_function(){' + val+';scoped_bm_rt=$bm_rt}' + ']')[0];
25519        var numKeys = property.kf ? data.k.length : 0;
25520
25521        var active = !this.data || this.data.hd !== true;
25522
25523        var wiggle = function wiggle(freq,amp){
25524            var i,j, len = this.pv.length ? this.pv.length : 1;
25525            var addedAmps = createTypedArray('float32', len);
25526            freq = 5;
25527            var iterations = Math.floor(time*freq);
25528            i = 0;
25529            j = 0;
25530            while(i<iterations){
25531                //var rnd = BMMath.random();
25532                for(j=0;j<len;j+=1){
25533                    addedAmps[j] += -amp + amp*2*BMMath.random();
25534                    //addedAmps[j] += -amp + amp*2*rnd;
25535                }
25536                i += 1;
25537            }
25538            //var rnd2 = BMMath.random();
25539            var periods = time*freq;
25540            var perc = periods - Math.floor(periods);
25541            var arr = createTypedArray('float32', len);
25542            if(len>1){
25543                for(j=0;j<len;j+=1){
25544                    arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*BMMath.random())*perc;
25545                    //arr[j] = this.pv[j] + addedAmps[j] + (-amp + amp*2*rnd)*perc;
25546                    //arr[i] = this.pv[i] + addedAmp + amp1*perc + amp2*(1-perc);
25547                }
25548                return arr;
25549            } else {
25550                return this.pv + addedAmps[0] + (-amp + amp*2*BMMath.random())*perc;
25551            }
25552        }.bind(this);
25553
25554        if(thisProperty.loopIn) {
25555            loopIn = thisProperty.loopIn.bind(thisProperty);
25556            loop_in = loopIn;
25557        }
25558
25559        if(thisProperty.loopOut) {
25560            loopOut = thisProperty.loopOut.bind(thisProperty);
25561            loop_out = loopOut;
25562        }
25563
25564        if(thisProperty.smooth) {
25565            smooth = thisProperty.smooth.bind(thisProperty);
25566        }
25567
25568        function loopInDuration(type,duration){
25569            return loopIn(type,duration,true);
25570        }
25571
25572        function loopOutDuration(type,duration){
25573            return loopOut(type,duration,true);
25574        }
25575
25576        if(this.getValueAtTime) {
25577            valueAtTime = this.getValueAtTime.bind(this);
25578        }
25579
25580        if(this.getVelocityAtTime) {
25581            velocityAtTime = this.getVelocityAtTime.bind(this);
25582        }
25583
25584        var comp = elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface);
25585
25586        function lookAt(elem1,elem2){
25587            var fVec = [elem2[0]-elem1[0],elem2[1]-elem1[1],elem2[2]-elem1[2]];
25588            var pitch = Math.atan2(fVec[0],Math.sqrt(fVec[1]*fVec[1]+fVec[2]*fVec[2]))/degToRads;
25589            var yaw = -Math.atan2(fVec[1],fVec[2])/degToRads;
25590            return [yaw,pitch,0];
25591        }
25592
25593        function easeOut(t, tMin, tMax, val1, val2){
25594            return applyEase(easeOutBez, t, tMin, tMax, val1, val2);
25595        }
25596
25597        function easeIn(t, tMin, tMax, val1, val2){
25598            return applyEase(easeInBez, t, tMin, tMax, val1, val2);
25599        }
25600
25601        function ease(t, tMin, tMax, val1, val2){
25602            return applyEase(easeInOutBez, t, tMin, tMax, val1, val2);
25603        }
25604
25605        function applyEase(fn, t, tMin, tMax, val1, val2) {
25606            if(val1 === undefined){
25607                val1 = tMin;
25608                val2 = tMax;
25609            } else {
25610                t = (t - tMin) / (tMax - tMin);
25611            }
25612            t = t > 1 ? 1 : t < 0 ? 0 : t;
25613            var mult = fn(t);
25614            if($bm_isInstanceOfArray(val1)) {
25615                var i, len = val1.length;
25616                var arr = createTypedArray('float32', len);
25617                for (i = 0; i < len; i += 1) {
25618                    arr[i] = (val2[i] - val1[i]) * mult + val1[i];
25619                }
25620                return arr;
25621            } else {
25622                return (val2 - val1) * mult + val1;
25623            }
25624        }
25625
25626        function nearestKey(time){
25627            var i, len = data.k.length,index,keyTime;
25628            if(!data.k.length || typeof(data.k[0]) === 'number'){
25629                index = 0;
25630                keyTime = 0;
25631            } else {
25632                index = -1;
25633                time *= elem.comp.globalData.frameRate;
25634                if (time < data.k[0].t) {
25635                    index = 1;
25636                    keyTime = data.k[0].t;
25637                } else {
25638                    for(i=0;i<len-1;i+=1){
25639                        if(time === data.k[i].t){
25640                            index = i + 1;
25641                            keyTime = data.k[i].t;
25642                            break;
25643                        }else if(time>data.k[i].t && time<data.k[i+1].t){
25644                            if(time-data.k[i].t > data.k[i+1].t - time){
25645                                index = i + 2;
25646                                keyTime = data.k[i+1].t;
25647                            } else {
25648                                index = i + 1;
25649                                keyTime = data.k[i].t;
25650                            }
25651                            break;
25652                        }
25653                    }
25654                    if(index === -1){
25655                        index = i + 1;
25656                        keyTime = data.k[i].t;
25657                    }
25658                }
25659                
25660            }
25661            var ob = {};
25662            ob.index = index;
25663            ob.time = keyTime/elem.comp.globalData.frameRate;
25664            return ob;
25665        }
25666
25667        function key(ind){
25668            var ob, i, len;
25669            if(!data.k.length || typeof(data.k[0]) === 'number'){
25670                throw new Error('The property has no keyframe at index ' + ind);
25671            }
25672            ind -= 1;
25673            ob = {
25674                time: data.k[ind].t/elem.comp.globalData.frameRate,
25675                value: []
25676            };
25677            var arr = data.k[ind].hasOwnProperty('s') ? data.k[ind].s : data.k[ind - 1].e;
25678
25679            len = arr.length;
25680            for(i=0;i<len;i+=1){
25681                ob[i] = arr[i];
25682                ob.value[i] = arr[i]
25683            }
25684            return ob;
25685        }
25686
25687        function framesToTime(frames, fps) { 
25688            if (!fps) {
25689                fps = elem.comp.globalData.frameRate;
25690            }
25691            return frames / fps;
25692        }
25693
25694        function timeToFrames(t, fps) {
25695            if (!t && t !== 0) {
25696                t = time;
25697            }
25698            if (!fps) {
25699                fps = elem.comp.globalData.frameRate;
25700            }
25701            return t * fps;
25702        }
25703
25704        function seedRandom(seed){
25705            BMMath.seedrandom(randSeed + seed);
25706        }
25707
25708        function sourceRectAtTime() {
25709            return elem.sourceRectAtTime();
25710        }
25711
25712        function substring(init, end) {
25713            if(typeof value === 'string') {
25714                if(end === undefined) {
25715                return value.substring(init)
25716                }
25717                return value.substring(init, end)
25718            }
25719            return '';
25720        }
25721
25722        function substr(init, end) {
25723            if(typeof value === 'string') {
25724                if(end === undefined) {
25725                return value.substr(init)
25726                }
25727                return value.substr(init, end)
25728            }
25729            return '';
25730        }
25731
25732        var time, velocity, value, text, textIndex, textTotal, selectorValue;
25733        var index = elem.data.ind;
25734        var hasParent = !!(elem.hierarchy && elem.hierarchy.length);
25735        var parent;
25736        var randSeed = Math.floor(Math.random()*1000000);
25737        var globalData = elem.globalData;
25738        function executeExpression(_value) {
25739            // globalData.pushExpression();
25740            value = _value;
25741            if (_needsRandom) {
25742                seedRandom(randSeed);
25743            }
25744            if (this.frameExpressionId === elem.globalData.frameId && this.propType !== 'textSelector') {
25745                return value;
25746            }
25747            if(this.propType === 'textSelector'){
25748                textIndex = this.textIndex;
25749                textTotal = this.textTotal;
25750                selectorValue = this.selectorValue;
25751            }
25752            if (!thisLayer) {
25753                text = elem.layerInterface.text;
25754                thisLayer = elem.layerInterface;
25755                thisComp = elem.comp.compInterface;
25756                toWorld = thisLayer.toWorld.bind(thisLayer);
25757                fromWorld = thisLayer.fromWorld.bind(thisLayer);
25758                fromComp = thisLayer.fromComp.bind(thisLayer);
25759                toComp = thisLayer.toComp.bind(thisLayer);
25760                mask = thisLayer.mask ? thisLayer.mask.bind(thisLayer) : null;
25761                fromCompToSurface = fromComp;
25762            }
25763            if (!transform) {
25764                transform = elem.layerInterface("ADBE Transform Group");
25765                $bm_transform = transform;
25766                if(transform) {
25767                    anchorPoint = transform.anchorPoint;
25768                    /*position = transform.position;
25769                    rotation = transform.rotation;
25770                    scale = transform.scale;*/
25771                }
25772            }
25773            
25774            if (elemType === 4 && !content) {
25775                content = thisLayer("ADBE Root Vectors Group");
25776            }
25777            if (!effect) {
25778                effect = thisLayer(4);
25779            }
25780            hasParent = !!(elem.hierarchy && elem.hierarchy.length);
25781            if (hasParent && !parent) {
25782                parent = elem.hierarchy[0].layerInterface;
25783            }
25784            time = this.comp.renderedFrame/this.comp.globalData.frameRate;
25785            if (needsVelocity) {
25786                velocity = velocityAtTime(time);
25787            }
25788            expression_function();
25789            this.frameExpressionId = elem.globalData.frameId;
25790
25791
25792            //TODO: Check if it's possible to return on ShapeInterface the .v value
25793            if (scoped_bm_rt.propType === "shape") {
25794                scoped_bm_rt = scoped_bm_rt.v;
25795            }
25796            // globalData.popExpression();
25797            return scoped_bm_rt;
25798        }
25799        return executeExpression;
25800    }
25801
25802    ob.initiateExpression = initiateExpression;
25803    return ob;
25804}());
25805var expressionHelpers = (function(){
25806
25807    function searchExpressions(elem,data,prop){
25808        if(data.x){
25809            prop.k = true;
25810            prop.x = true;
25811            prop.initiateExpression = ExpressionManager.initiateExpression;
25812            prop.effectsSequence.push(prop.initiateExpression(elem,data,prop).bind(prop));
25813        }
25814    }
25815
25816    function getValueAtTime(frameNum) {
25817        frameNum *= this.elem.globalData.frameRate;
25818        frameNum -= this.offsetTime;
25819        if(frameNum !== this._cachingAtTime.lastFrame) {
25820            this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
25821            this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
25822            this._cachingAtTime.lastFrame = frameNum;
25823        }
25824        return this._cachingAtTime.value;
25825
25826    }
25827
25828    function getSpeedAtTime(frameNum) {
25829        var delta = -0.01;
25830        var v1 = this.getValueAtTime(frameNum);
25831        var v2 = this.getValueAtTime(frameNum + delta);
25832        var speed = 0;
25833        if(v1.length){
25834            var i;
25835            for(i=0;i<v1.length;i+=1){
25836                speed += Math.pow(v2[i] - v1[i], 2);
25837            }
25838            speed = Math.sqrt(speed) * 100;
25839        } else {
25840            speed = 0;
25841        }
25842        return speed;
25843    }
25844
25845    function getVelocityAtTime(frameNum) {
25846        if(this.vel !== undefined){
25847            return this.vel;
25848        }
25849        var delta = -0.001;
25850        //frameNum += this.elem.data.st;
25851        var v1 = this.getValueAtTime(frameNum);
25852        var v2 = this.getValueAtTime(frameNum + delta);
25853        var velocity;
25854        if(v1.length){
25855            velocity = createTypedArray('float32', v1.length);
25856            var i;
25857            for(i=0;i<v1.length;i+=1){
25858                //removing frameRate
25859                //if needed, don't add it here
25860                //velocity[i] = this.elem.globalData.frameRate*((v2[i] - v1[i])/delta);
25861                velocity[i] = (v2[i] - v1[i])/delta;
25862            }
25863        } else {
25864            velocity = (v2 - v1)/delta;
25865        }
25866        return velocity;
25867    }
25868
25869    function getStaticValueAtTime() {
25870        return this.pv;
25871    }
25872
25873    function setGroupProperty(propertyGroup){
25874        this.propertyGroup = propertyGroup;
25875    }
25876
25877	return {
25878		searchExpressions: searchExpressions,
25879		getSpeedAtTime: getSpeedAtTime,
25880		getVelocityAtTime: getVelocityAtTime,
25881		getValueAtTime: getValueAtTime,
25882		getStaticValueAtTime: getStaticValueAtTime,
25883		setGroupProperty: setGroupProperty,
25884	}
25885}());
25886(function addPropertyDecorator() {
25887
25888    function loopOut(type,duration,durationFlag){
25889        if(!this.k || !this.keyframes){
25890            return this.pv;
25891        }
25892        type = type ? type.toLowerCase() : '';
25893        var currentFrame = this.comp.renderedFrame;
25894        var keyframes = this.keyframes;
25895        var lastKeyFrame = keyframes[keyframes.length - 1].t;
25896        if(currentFrame<=lastKeyFrame){
25897            return this.pv;
25898        }else{
25899            var cycleDuration, firstKeyFrame;
25900            if(!durationFlag){
25901                if(!duration || duration > keyframes.length - 1){
25902                    duration = keyframes.length - 1;
25903                }
25904                firstKeyFrame = keyframes[keyframes.length - 1 - duration].t;
25905                cycleDuration = lastKeyFrame - firstKeyFrame;
25906            } else {
25907                if(!duration){
25908                    cycleDuration = Math.max(0,lastKeyFrame - this.elem.data.ip);
25909                } else {
25910                    cycleDuration = Math.abs(lastKeyFrame - elem.comp.globalData.frameRate*duration);
25911                }
25912                firstKeyFrame = lastKeyFrame - cycleDuration;
25913            }
25914            var i, len, ret;
25915            if(type === 'pingpong') {
25916                var iterations = Math.floor((currentFrame - firstKeyFrame)/cycleDuration);
25917                if(iterations % 2 !== 0){
25918                    return this.getValueAtTime(((cycleDuration - (currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
25919                }
25920            } else if(type === 'offset'){
25921                var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
25922                var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
25923                var current = this.getValueAtTime(((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame) / this.comp.globalData.frameRate, 0);
25924                var repeats = Math.floor((currentFrame - firstKeyFrame)/cycleDuration);
25925                if(this.pv.length){
25926                    ret = new Array(initV.length);
25927                    len = ret.length;
25928                    for(i=0;i<len;i+=1){
25929                        ret[i] = (endV[i]-initV[i])*repeats + current[i];
25930                    }
25931                    return ret;
25932                }
25933                return (endV-initV)*repeats + current;
25934            } else if(type === 'continue'){
25935                var lastValue = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
25936                var nextLastValue = this.getValueAtTime((lastKeyFrame - 0.001) / this.comp.globalData.frameRate, 0);
25937                if(this.pv.length){
25938                    ret = new Array(lastValue.length);
25939                    len = ret.length;
25940                    for(i=0;i<len;i+=1){
25941                        ret[i] = lastValue[i] + (lastValue[i]-nextLastValue[i])*((currentFrame - lastKeyFrame)/ this.comp.globalData.frameRate)/0.0005;
25942                    }
25943                    return ret;
25944                }
25945                return lastValue + (lastValue-nextLastValue)*(((currentFrame - lastKeyFrame))/0.001);
25946            }
25947            return this.getValueAtTime((((currentFrame - firstKeyFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
25948        }
25949    }
25950
25951    function loopIn(type,duration, durationFlag) {
25952        if(!this.k){
25953            return this.pv;
25954        }
25955        type = type ? type.toLowerCase() : '';
25956        var currentFrame = this.comp.renderedFrame;
25957        var keyframes = this.keyframes;
25958        var firstKeyFrame = keyframes[0].t;
25959        if(currentFrame>=firstKeyFrame){
25960            return this.pv;
25961        }else{
25962            var cycleDuration, lastKeyFrame;
25963            if(!durationFlag){
25964                if(!duration || duration > keyframes.length - 1){
25965                    duration = keyframes.length - 1;
25966                }
25967                lastKeyFrame = keyframes[duration].t;
25968                cycleDuration = lastKeyFrame - firstKeyFrame;
25969            } else {
25970                if(!duration){
25971                    cycleDuration = Math.max(0,this.elem.data.op - firstKeyFrame);
25972                } else {
25973                    cycleDuration = Math.abs(elem.comp.globalData.frameRate*duration);
25974                }
25975                lastKeyFrame = firstKeyFrame + cycleDuration;
25976            }
25977            var i, len, ret;
25978            if(type === 'pingpong') {
25979                var iterations = Math.floor((firstKeyFrame - currentFrame)/cycleDuration);
25980                if(iterations % 2 === 0){
25981                    return this.getValueAtTime((((firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
25982                }
25983            } else if(type === 'offset'){
25984                var initV = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
25985                var endV = this.getValueAtTime(lastKeyFrame / this.comp.globalData.frameRate, 0);
25986                var current = this.getValueAtTime((cycleDuration - (firstKeyFrame - currentFrame)%cycleDuration +  firstKeyFrame) / this.comp.globalData.frameRate, 0);
25987                var repeats = Math.floor((firstKeyFrame - currentFrame)/cycleDuration)+1;
25988                if(this.pv.length){
25989                    ret = new Array(initV.length);
25990                    len = ret.length;
25991                    for(i=0;i<len;i+=1){
25992                        ret[i] = current[i]-(endV[i]-initV[i])*repeats;
25993                    }
25994                    return ret;
25995                }
25996                return current-(endV-initV)*repeats;
25997            } else if(type === 'continue'){
25998                var firstValue = this.getValueAtTime(firstKeyFrame / this.comp.globalData.frameRate, 0);
25999                var nextFirstValue = this.getValueAtTime((firstKeyFrame + 0.001) / this.comp.globalData.frameRate, 0);
26000                if(this.pv.length){
26001                    ret = new Array(firstValue.length);
26002                    len = ret.length;
26003                    for(i=0;i<len;i+=1){
26004                        ret[i] = firstValue[i] + (firstValue[i]-nextFirstValue[i])*(firstKeyFrame - currentFrame)/0.001;
26005                    }
26006                    return ret;
26007                }
26008                return firstValue + (firstValue-nextFirstValue)*(firstKeyFrame - currentFrame)/0.001;
26009            }
26010            return this.getValueAtTime(((cycleDuration - (firstKeyFrame - currentFrame) % cycleDuration +  firstKeyFrame)) / this.comp.globalData.frameRate, 0);
26011        }
26012    }
26013
26014    function smooth(width, samples) {
26015        if (!this.k){
26016            return this.pv;
26017        }
26018        width = (width || 0.4) * 0.5;
26019        samples = Math.floor(samples || 5);
26020        if (samples <= 1) {
26021            return this.pv;
26022        }
26023        var currentTime = this.comp.renderedFrame / this.comp.globalData.frameRate;
26024        var initFrame = currentTime - width;
26025        var endFrame = currentTime + width;
26026        var sampleFrequency = samples > 1 ? (endFrame - initFrame) / (samples - 1) : 1;
26027        var i = 0, j = 0;
26028        var value;
26029        if (this.pv.length) {
26030            value = createTypedArray('float32', this.pv.length);
26031        } else {
26032            value = 0;
26033        }
26034        var sampleValue;
26035        while (i < samples) {
26036            sampleValue = this.getValueAtTime(initFrame + i * sampleFrequency);
26037            if(this.pv.length) {
26038                for (j = 0; j < this.pv.length; j += 1) {
26039                    value[j] += sampleValue[j];
26040                }
26041            } else {
26042                value += sampleValue;
26043            }
26044            i += 1;
26045        }
26046        if(this.pv.length) {
26047            for (j = 0; j < this.pv.length; j += 1) {
26048                value[j] /= samples;
26049            }
26050        } else {
26051            value /= samples;
26052        }
26053        return value;
26054    }
26055
26056    function getValueAtTime(frameNum) {
26057        frameNum *= this.elem.globalData.frameRate;
26058        frameNum -= this.offsetTime;
26059        if(frameNum !== this._cachingAtTime.lastFrame) {
26060            this._cachingAtTime.lastIndex = this._cachingAtTime.lastFrame < frameNum ? this._cachingAtTime.lastIndex : 0;
26061            this._cachingAtTime.value = this.interpolateValue(frameNum, this._cachingAtTime);
26062            this._cachingAtTime.lastFrame = frameNum;
26063        }
26064        return this._cachingAtTime.value;
26065
26066    }
26067
26068    function getTransformValueAtTime(time) {
26069        console.warn('Transform at time not supported');
26070    }
26071
26072    function getTransformStaticValueAtTime(time) {
26073
26074    }
26075
26076    var getTransformProperty = TransformPropertyFactory.getTransformProperty;
26077    TransformPropertyFactory.getTransformProperty = function(elem, data, container) {
26078        var prop = getTransformProperty(elem, data, container);
26079        if(prop.dynamicProperties.length) {
26080            prop.getValueAtTime = getTransformValueAtTime.bind(prop);
26081        } else {
26082            prop.getValueAtTime = getTransformStaticValueAtTime.bind(prop);
26083        }
26084        prop.setGroupProperty = expressionHelpers.setGroupProperty;
26085        return prop;
26086    };
26087
26088    var propertyGetProp = PropertyFactory.getProp;
26089    PropertyFactory.getProp = function(elem,data,type, mult, container){
26090        var prop = propertyGetProp(elem,data,type, mult, container);
26091        //prop.getVelocityAtTime = getVelocityAtTime;
26092        //prop.loopOut = loopOut;
26093        //prop.loopIn = loopIn;
26094        if(prop.kf){
26095            prop.getValueAtTime = expressionHelpers.getValueAtTime.bind(prop);
26096        } else {
26097            prop.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(prop);
26098        }
26099        prop.setGroupProperty = expressionHelpers.setGroupProperty;
26100        prop.loopOut = loopOut;
26101        prop.loopIn = loopIn;
26102        prop.smooth = smooth;
26103        prop.getVelocityAtTime = expressionHelpers.getVelocityAtTime.bind(prop);
26104        prop.getSpeedAtTime = expressionHelpers.getSpeedAtTime.bind(prop);
26105        prop.numKeys = data.a === 1 ? data.k.length : 0;
26106        prop.propertyIndex = data.ix;
26107        var value = 0;
26108        if(type !== 0) {
26109            value = createTypedArray('float32', data.a === 1 ?  data.k[0].s.length : data.k.length);
26110        }
26111        prop._cachingAtTime = {
26112            lastFrame: initialDefaultFrame,
26113            lastIndex: 0,
26114            value: value
26115        };
26116        expressionHelpers.searchExpressions(elem,data,prop);
26117        if(prop.k){
26118            container.addDynamicProperty(prop);
26119        }
26120
26121        return prop;
26122    };
26123
26124    function getShapeValueAtTime(frameNum) {
26125        //For now this caching object is created only when needed instead of creating it when the shape is initialized.
26126        if (!this._cachingAtTime) {
26127            this._cachingAtTime = {
26128                shapeValue: shape_pool.clone(this.pv),
26129                lastIndex: 0,
26130                lastTime: initialDefaultFrame
26131            };
26132        }
26133        
26134        frameNum *= this.elem.globalData.frameRate;
26135        frameNum -= this.offsetTime;
26136        if(frameNum !== this._cachingAtTime.lastTime) {
26137            this._cachingAtTime.lastIndex = this._cachingAtTime.lastTime < frameNum ? this._caching.lastIndex : 0;
26138            this._cachingAtTime.lastTime = frameNum;
26139            this.interpolateShape(frameNum, this._cachingAtTime.shapeValue, this._cachingAtTime);
26140        }
26141        return this._cachingAtTime.shapeValue;
26142    }
26143
26144    var ShapePropertyConstructorFunction = ShapePropertyFactory.getConstructorFunction();
26145    var KeyframedShapePropertyConstructorFunction = ShapePropertyFactory.getKeyframedConstructorFunction();
26146
26147    function ShapeExpressions(){}
26148    ShapeExpressions.prototype = {
26149        vertices: function(prop, time){
26150            if (this.k) {
26151                this.getValue();
26152            }
26153            var shapePath = this.v;
26154            if(time !== undefined) {
26155                shapePath = this.getValueAtTime(time, 0);
26156            }
26157            var i, len = shapePath._length;
26158            var vertices = shapePath[prop];
26159            var points = shapePath.v;
26160            var arr = createSizedArray(len);
26161            for(i = 0; i < len; i += 1) {
26162                if(prop === 'i' || prop === 'o') {
26163                    arr[i] = [vertices[i][0] - points[i][0], vertices[i][1] - points[i][1]];
26164                } else {
26165                    arr[i] = [vertices[i][0], vertices[i][1]];
26166                }
26167                
26168            }
26169            return arr;
26170        },
26171        points: function(time){
26172            return this.vertices('v', time);
26173        },
26174        inTangents: function(time){
26175            return this.vertices('i', time);
26176        },
26177        outTangents: function(time){
26178            return this.vertices('o', time);
26179        },
26180        isClosed: function(){
26181            return this.v.c;
26182        },
26183        pointOnPath: function(perc, time){
26184            var shapePath = this.v;
26185            if(time !== undefined) {
26186                shapePath = this.getValueAtTime(time, 0);
26187            }
26188            if(!this._segmentsLength) {
26189                this._segmentsLength = bez.getSegmentsLength(shapePath);
26190            }
26191
26192            var segmentsLength = this._segmentsLength;
26193            var lengths = segmentsLength.lengths;
26194            var lengthPos = segmentsLength.totalLength * perc;
26195            var i = 0, len = lengths.length;
26196            var j = 0, jLen;
26197            var accumulatedLength = 0, pt;
26198            while(i < len) {
26199                if(accumulatedLength + lengths[i].addedLength > lengthPos) {
26200                    var initIndex = i;
26201                    var endIndex = (shapePath.c && i === len - 1) ? 0 : i + 1;
26202                    var segmentPerc = (lengthPos - accumulatedLength)/lengths[i].addedLength;
26203                    pt = bez.getPointInSegment(shapePath.v[initIndex], shapePath.v[endIndex], shapePath.o[initIndex], shapePath.i[endIndex], segmentPerc, lengths[i]);
26204                    break;
26205                } else {
26206                    accumulatedLength += lengths[i].addedLength;
26207                }
26208                i += 1;
26209            }
26210            if(!pt){
26211                pt = shapePath.c ? [shapePath.v[0][0],shapePath.v[0][1]]:[shapePath.v[shapePath._length-1][0],shapePath.v[shapePath._length-1][1]];
26212            }
26213            return pt;
26214        },
26215        vectorOnPath: function(perc, time, vectorType){
26216            //perc doesn't use triple equality because it can be a Number object as well as a primitive.
26217            perc = perc == 1 ? this.v.c ? 0 : 0.999 : perc;
26218            var pt1 = this.pointOnPath(perc, time);
26219            var pt2 = this.pointOnPath(perc + 0.001, time);
26220            var xLength = pt2[0] - pt1[0];
26221            var yLength = pt2[1] - pt1[1];
26222            var magnitude = Math.sqrt(Math.pow(xLength,2) + Math.pow(yLength,2));
26223            if (magnitude === 0) {
26224                return [0,0];
26225            }
26226            var unitVector = vectorType === 'tangent' ? [xLength/magnitude, yLength/magnitude] : [-yLength/magnitude, xLength/magnitude];
26227            return unitVector;
26228        },
26229        tangentOnPath: function(perc, time){
26230            return this.vectorOnPath(perc, time, 'tangent');
26231        },
26232        normalOnPath: function(perc, time){
26233            return this.vectorOnPath(perc, time, 'normal');
26234        },
26235        setGroupProperty: expressionHelpers.setGroupProperty,
26236        getValueAtTime: expressionHelpers.getStaticValueAtTime
26237    };
26238    extendPrototype([ShapeExpressions], ShapePropertyConstructorFunction);
26239    extendPrototype([ShapeExpressions], KeyframedShapePropertyConstructorFunction);
26240    KeyframedShapePropertyConstructorFunction.prototype.getValueAtTime = getShapeValueAtTime;
26241    KeyframedShapePropertyConstructorFunction.prototype.initiateExpression = ExpressionManager.initiateExpression;
26242
26243    var propertyGetShapeProp = ShapePropertyFactory.getShapeProp;
26244    ShapePropertyFactory.getShapeProp = function(elem,data,type, arr, trims){
26245        var prop = propertyGetShapeProp(elem,data,type, arr, trims);
26246        prop.propertyIndex = data.ix;
26247        prop.lock = false;
26248        if(type === 3){
26249            expressionHelpers.searchExpressions(elem,data.pt,prop);
26250        } else if(type === 4){
26251            expressionHelpers.searchExpressions(elem,data.ks,prop);
26252        }
26253        if(prop.k){
26254            elem.addDynamicProperty(prop);
26255        }
26256        return prop;
26257    };
26258}());
26259(function addDecorator() {
26260
26261    function searchExpressions(){
26262        if(this.data.d.x){
26263            this.calculateExpression = ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this);
26264            this.addEffect(this.getExpressionValue.bind(this));
26265            return true;
26266        }
26267    }
26268
26269    TextProperty.prototype.getExpressionValue = function(currentValue, text) {
26270        var newValue = this.calculateExpression(text);
26271        if(currentValue.t !== newValue) {
26272            var newData = {};
26273            this.copyData(newData, currentValue);
26274            newData.t = newValue.toString();
26275            newData.__complete = false;
26276            return newData;
26277        }
26278        return currentValue;
26279    }
26280
26281    TextProperty.prototype.searchProperty = function(){
26282
26283        var isKeyframed = this.searchKeyframes();
26284        var hasExpressions = this.searchExpressions();
26285        this.kf = isKeyframed || hasExpressions;
26286        return this.kf;
26287    };
26288
26289    TextProperty.prototype.searchExpressions = searchExpressions;
26290    
26291}());
26292var ShapeExpressionInterface = (function(){
26293
26294    function iterateElements(shapes,view, propertyGroup){
26295        var arr = [];
26296        var i, len = shapes ? shapes.length : 0;
26297        for(i=0;i<len;i+=1){
26298            if(shapes[i].ty == 'gr'){
26299                arr.push(groupInterfaceFactory(shapes[i],view[i],propertyGroup));
26300            }else if(shapes[i].ty == 'fl'){
26301                arr.push(fillInterfaceFactory(shapes[i],view[i],propertyGroup));
26302            }else if(shapes[i].ty == 'st'){
26303                arr.push(strokeInterfaceFactory(shapes[i],view[i],propertyGroup));
26304            }else if(shapes[i].ty == 'tm'){
26305                arr.push(trimInterfaceFactory(shapes[i],view[i],propertyGroup));
26306            }else if(shapes[i].ty == 'tr'){
26307                //arr.push(transformInterfaceFactory(shapes[i],view[i],propertyGroup));
26308            }else if(shapes[i].ty == 'el'){
26309                arr.push(ellipseInterfaceFactory(shapes[i],view[i],propertyGroup));
26310            }else if(shapes[i].ty == 'sr'){
26311                arr.push(starInterfaceFactory(shapes[i],view[i],propertyGroup));
26312            } else if(shapes[i].ty == 'sh'){
26313                arr.push(pathInterfaceFactory(shapes[i],view[i],propertyGroup));
26314            } else if(shapes[i].ty == 'rc'){
26315                arr.push(rectInterfaceFactory(shapes[i],view[i],propertyGroup));
26316            } else if(shapes[i].ty == 'rd'){
26317                arr.push(roundedInterfaceFactory(shapes[i],view[i],propertyGroup));
26318            } else if(shapes[i].ty == 'rp'){
26319                arr.push(repeaterInterfaceFactory(shapes[i],view[i],propertyGroup));
26320            }
26321        }
26322        return arr;
26323    }
26324
26325    function contentsInterfaceFactory(shape,view, propertyGroup){
26326       var interfaces;
26327       var interfaceFunction = function _interfaceFunction(value){
26328           var i = 0, len = interfaces.length;
26329            while(i<len){
26330                if(interfaces[i]._name === value || interfaces[i].mn === value || interfaces[i].propertyIndex === value || interfaces[i].ix === value || interfaces[i].ind === value){
26331                   return interfaces[i];
26332                }
26333                i+=1;
26334            }
26335            if(typeof value === 'number'){
26336               return interfaces[value-1];
26337            }
26338       };
26339       interfaceFunction.propertyGroup = function(val){
26340           if(val === 1){
26341               return interfaceFunction;
26342           } else{
26343               return propertyGroup(val-1);
26344           }
26345       };
26346       interfaces = iterateElements(shape.it, view.it, interfaceFunction.propertyGroup);
26347       interfaceFunction.numProperties = interfaces.length;
26348       interfaceFunction.propertyIndex = shape.cix;
26349       interfaceFunction._name = shape.nm;
26350
26351       return interfaceFunction;
26352   }
26353
26354    function groupInterfaceFactory(shape,view, propertyGroup){
26355        var interfaceFunction = function _interfaceFunction(value){
26356            switch(value){
26357                case 'ADBE Vectors Group':
26358                case 'Contents':
26359                case 2:
26360                    return interfaceFunction.content;
26361                //Not necessary for now. Keeping them here in case a new case appears
26362                //case 'ADBE Vector Transform Group':
26363                //case 3:
26364                default:
26365                    return interfaceFunction.transform;
26366            }
26367        };
26368        interfaceFunction.propertyGroup = function(val){
26369            if(val === 1){
26370                return interfaceFunction;
26371            } else{
26372                return propertyGroup(val-1);
26373            }
26374        };
26375        var content = contentsInterfaceFactory(shape,view,interfaceFunction.propertyGroup);
26376        var transformInterface = transformInterfaceFactory(shape.it[shape.it.length - 1],view.it[view.it.length - 1],interfaceFunction.propertyGroup);
26377        interfaceFunction.content = content;
26378        interfaceFunction.transform = transformInterface;
26379        Object.defineProperty(interfaceFunction, '_name', {
26380            get: function(){
26381                return shape.nm;
26382            }
26383        });
26384        //interfaceFunction.content = interfaceFunction;
26385        interfaceFunction.numProperties = shape.np;
26386        interfaceFunction.propertyIndex = shape.ix;
26387        interfaceFunction.nm = shape.nm;
26388        interfaceFunction.mn = shape.mn;
26389        return interfaceFunction;
26390    }
26391
26392    function fillInterfaceFactory(shape,view,propertyGroup){
26393        function interfaceFunction(val){
26394            if(val === 'Color' || val === 'color'){
26395                return interfaceFunction.color;
26396            } else if(val === 'Opacity' || val === 'opacity'){
26397                return interfaceFunction.opacity;
26398            }
26399        }
26400        Object.defineProperties(interfaceFunction, {
26401            'color': {
26402                get: ExpressionPropertyInterface(view.c)
26403            },
26404            'opacity': {
26405                get: ExpressionPropertyInterface(view.o)
26406            },
26407            '_name': { value: shape.nm },
26408            'mn': { value: shape.mn }
26409        });
26410
26411        view.c.setGroupProperty(propertyGroup);
26412        view.o.setGroupProperty(propertyGroup);
26413        return interfaceFunction;
26414    }
26415
26416    function strokeInterfaceFactory(shape,view,propertyGroup){
26417        function _propertyGroup(val){
26418            if(val === 1){
26419                return ob;
26420            } else{
26421                return propertyGroup(val-1);
26422            }
26423        }
26424        function _dashPropertyGroup(val){
26425            if(val === 1){
26426                return dashOb;
26427            } else{
26428                return _propertyGroup(val-1);
26429            }
26430        }
26431        function addPropertyToDashOb(i) {
26432            Object.defineProperty(dashOb, shape.d[i].nm, {
26433                get: ExpressionPropertyInterface(view.d.dataProps[i].p)
26434            });
26435        }
26436        var i, len = shape.d ? shape.d.length : 0;
26437        var dashOb = {};
26438        for (i = 0; i < len; i += 1) {
26439            addPropertyToDashOb(i);
26440            view.d.dataProps[i].p.setGroupProperty(_dashPropertyGroup);
26441        }
26442
26443        function interfaceFunction(val){
26444            if(val === 'Color' || val === 'color'){
26445                return interfaceFunction.color;
26446            } else if(val === 'Opacity' || val === 'opacity'){
26447                return interfaceFunction.opacity;
26448            } else if(val === 'Stroke Width' || val === 'stroke width'){
26449                return interfaceFunction.strokeWidth;
26450            }
26451        }
26452        Object.defineProperties(interfaceFunction, {
26453            'color': {
26454                get: ExpressionPropertyInterface(view.c)
26455            },
26456            'opacity': {
26457                get: ExpressionPropertyInterface(view.o)
26458            },
26459            'strokeWidth': {
26460                get: ExpressionPropertyInterface(view.w)
26461            },
26462            'dash': {
26463                get: function() {
26464                    return dashOb;
26465                }
26466            },
26467            '_name': { value: shape.nm },
26468            'mn': { value: shape.mn }
26469        });
26470
26471        view.c.setGroupProperty(_propertyGroup);
26472        view.o.setGroupProperty(_propertyGroup);
26473        view.w.setGroupProperty(_propertyGroup);
26474        return interfaceFunction;
26475    }
26476
26477    function trimInterfaceFactory(shape,view,propertyGroup){
26478        function _propertyGroup(val){
26479            if(val == 1){
26480                return interfaceFunction;
26481            } else {
26482                return propertyGroup(--val);
26483            }
26484        }
26485        interfaceFunction.propertyIndex = shape.ix;
26486
26487        view.s.setGroupProperty(_propertyGroup);
26488        view.e.setGroupProperty(_propertyGroup);
26489        view.o.setGroupProperty(_propertyGroup);
26490
26491        function interfaceFunction(val){
26492            if(val === shape.e.ix || val === 'End' || val === 'end'){
26493                return interfaceFunction.end;
26494            }
26495            if(val === shape.s.ix){
26496                return interfaceFunction.start;
26497            }
26498            if(val === shape.o.ix){
26499                return interfaceFunction.offset;
26500            }
26501        }
26502        interfaceFunction.propertyIndex = shape.ix;
26503        interfaceFunction.propertyGroup = propertyGroup;
26504
26505        Object.defineProperties(interfaceFunction, {
26506            'start': {
26507                get: ExpressionPropertyInterface(view.s)
26508            },
26509            'end': {
26510                get: ExpressionPropertyInterface(view.e)
26511            },
26512            'offset': {
26513                get: ExpressionPropertyInterface(view.o)
26514            },
26515            '_name': { value: shape.nm }
26516        });
26517        interfaceFunction.mn = shape.mn;
26518        return interfaceFunction;
26519    }
26520
26521    function transformInterfaceFactory(shape,view,propertyGroup){
26522        function _propertyGroup(val){
26523            if(val == 1){
26524                return interfaceFunction;
26525            } else {
26526                return propertyGroup(--val);
26527            }
26528        }
26529        view.transform.mProps.o.setGroupProperty(_propertyGroup);
26530        view.transform.mProps.p.setGroupProperty(_propertyGroup);
26531        view.transform.mProps.a.setGroupProperty(_propertyGroup);
26532        view.transform.mProps.s.setGroupProperty(_propertyGroup);
26533        view.transform.mProps.r.setGroupProperty(_propertyGroup);
26534        if(view.transform.mProps.sk){
26535            view.transform.mProps.sk.setGroupProperty(_propertyGroup);
26536            view.transform.mProps.sa.setGroupProperty(_propertyGroup);
26537        }
26538        view.transform.op.setGroupProperty(_propertyGroup);
26539
26540        function interfaceFunction(value){
26541            if(shape.a.ix === value || value === 'Anchor Point'){
26542                return interfaceFunction.anchorPoint;
26543            }
26544            if(shape.o.ix === value || value === 'Opacity'){
26545                return interfaceFunction.opacity;
26546            }
26547            if(shape.p.ix === value || value === 'Position'){
26548                return interfaceFunction.position;
26549            }
26550            if(shape.r.ix === value || value === 'Rotation' || value === 'ADBE Vector Rotation'){
26551                return interfaceFunction.rotation;
26552            }
26553            if(shape.s.ix === value || value === 'Scale'){
26554                return interfaceFunction.scale;
26555            }
26556            if(shape.sk && shape.sk.ix === value || value === 'Skew'){
26557                return interfaceFunction.skew;
26558            }
26559            if(shape.sa && shape.sa.ix === value || value === 'Skew Axis'){
26560                return interfaceFunction.skewAxis;
26561            }
26562
26563        }
26564        Object.defineProperties(interfaceFunction, {
26565            'opacity': {
26566                get: ExpressionPropertyInterface(view.transform.mProps.o)
26567            },
26568            'position': {
26569                get: ExpressionPropertyInterface(view.transform.mProps.p)
26570            },
26571            'anchorPoint': {
26572                get: ExpressionPropertyInterface(view.transform.mProps.a)
26573            },
26574            'scale': {
26575                get: ExpressionPropertyInterface(view.transform.mProps.s)
26576            },
26577            'rotation': {
26578                get: ExpressionPropertyInterface(view.transform.mProps.r)
26579            },
26580            'skew': {
26581                get: ExpressionPropertyInterface(view.transform.mProps.sk)
26582            },
26583            'skewAxis': {
26584                get: ExpressionPropertyInterface(view.transform.mProps.sa)
26585            },
26586            '_name': { value: shape.nm }
26587        });
26588        interfaceFunction.ty = 'tr';
26589        interfaceFunction.mn = shape.mn;
26590        interfaceFunction.propertyGroup = propertyGroup;
26591        return interfaceFunction;
26592    }
26593
26594    function ellipseInterfaceFactory(shape,view,propertyGroup){
26595        function _propertyGroup(val){
26596            if(val == 1){
26597                return interfaceFunction;
26598            } else {
26599                return propertyGroup(--val);
26600            }
26601        }
26602        interfaceFunction.propertyIndex = shape.ix;
26603        var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
26604        prop.s.setGroupProperty(_propertyGroup);
26605        prop.p.setGroupProperty(_propertyGroup);
26606        function interfaceFunction(value){
26607            if(shape.p.ix === value){
26608                return interfaceFunction.position;
26609            }
26610            if(shape.s.ix === value){
26611                return interfaceFunction.size;
26612            }
26613        }
26614
26615        Object.defineProperties(interfaceFunction, {
26616            'size': {
26617                get: ExpressionPropertyInterface(prop.s)
26618            },
26619            'position': {
26620                get: ExpressionPropertyInterface(prop.p)
26621            },
26622            '_name': { value: shape.nm }
26623        });
26624        interfaceFunction.mn = shape.mn;
26625        return interfaceFunction;
26626    }
26627
26628    function starInterfaceFactory(shape,view,propertyGroup){
26629        function _propertyGroup(val){
26630            if(val == 1){
26631                return interfaceFunction;
26632            } else {
26633                return propertyGroup(--val);
26634            }
26635        }
26636        var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
26637        interfaceFunction.propertyIndex = shape.ix;
26638        prop.or.setGroupProperty(_propertyGroup);
26639        prop.os.setGroupProperty(_propertyGroup);
26640        prop.pt.setGroupProperty(_propertyGroup);
26641        prop.p.setGroupProperty(_propertyGroup);
26642        prop.r.setGroupProperty(_propertyGroup);
26643        if(shape.ir){
26644            prop.ir.setGroupProperty(_propertyGroup);
26645            prop.is.setGroupProperty(_propertyGroup);
26646        }
26647
26648        function interfaceFunction(value){
26649            if(shape.p.ix === value){
26650                return interfaceFunction.position;
26651            }
26652            if(shape.r.ix === value){
26653                return interfaceFunction.rotation;
26654            }
26655            if(shape.pt.ix === value){
26656                return interfaceFunction.points;
26657            }
26658            if(shape.or.ix === value || 'ADBE Vector Star Outer Radius' === value){
26659                return interfaceFunction.outerRadius;
26660            }
26661            if(shape.os.ix === value){
26662                return interfaceFunction.outerRoundness;
26663            }
26664            if(shape.ir && (shape.ir.ix === value || 'ADBE Vector Star Inner Radius' === value)){
26665                return interfaceFunction.innerRadius;
26666            }
26667            if(shape.is && shape.is.ix === value){
26668                return interfaceFunction.innerRoundness;
26669            }
26670
26671        }
26672
26673        Object.defineProperties(interfaceFunction, {
26674            'position': {
26675                get: ExpressionPropertyInterface(prop.p)
26676            },
26677            'rotation': {
26678                get: ExpressionPropertyInterface(prop.r)
26679            },
26680            'points': {
26681                get: ExpressionPropertyInterface(prop.pt)
26682            },
26683            'outerRadius': {
26684                get: ExpressionPropertyInterface(prop.or)
26685            },
26686            'outerRoundness': {
26687                get: ExpressionPropertyInterface(prop.os)
26688            },
26689            'innerRadius': {
26690                get: ExpressionPropertyInterface(prop.ir)
26691            },
26692            'innerRoundness': {
26693                get: ExpressionPropertyInterface(prop.is)
26694            },
26695            '_name': { value: shape.nm }
26696        });
26697        interfaceFunction.mn = shape.mn;
26698        return interfaceFunction;
26699    }
26700
26701    function rectInterfaceFactory(shape,view,propertyGroup){
26702        function _propertyGroup(val){
26703            if(val == 1){
26704                return interf
26704aceFunction;
26705            } else {
26706                return propertyGroup(--val);
26707            }
26708        }
26709        var prop = view.sh.ty === 'tm' ? view.sh.prop : view.sh;
26710        interfaceFunction.propertyIndex = shape.ix;
26711        prop.p.setGroupProperty(_propertyGroup);
26712        prop.s.setGroupProperty(_propertyGroup);
26713        prop.r.setGroupProperty(_propertyGroup);
26714
26715        function interfaceFunction(value){
26716            if(shape.p.ix === value){
26717                return interfaceFunction.position;
26718            }
26719            if(shape.r.ix === value){
26720                return interfaceFunction.roundness;
26721            }
26722            if(shape.s.ix === value || value === 'Size' || value === 'ADBE Vector Rect Size'){
26723                return interfaceFunction.size;
26724            }
26725
26726        }
26727        Object.defineProperties(interfaceFunction, {
26728            'position': {
26729                get: ExpressionPropertyInterface(prop.p)
26730            },
26731            'roundness': {
26732                get: ExpressionPropertyInterface(prop.r)
26733            },
26734            'size': {
26735                get: ExpressionPropertyInterface(prop.s)
26736            },
26737            '_name': { value: shape.nm }
26738        });
26739        interfaceFunction.mn = shape.mn;
26740        return interfaceFunction;
26741    }
26742
26743    function roundedInterfaceFactory(shape,view,propertyGroup){
26744        function _propertyGroup(val){
26745            if(val == 1){
26746                return interfaceFunction;
26747            } else {
26748                return propertyGroup(--val);
26749            }
26750        }
26751        var prop = view;
26752        interfaceFunction.propertyIndex = shape.ix;
26753        prop.rd.setGroupProperty(_propertyGroup);
26754
26755        function interfaceFunction(value){
26756            if(shape.r.ix === value || 'Round Corners 1' === value){
26757                return interfaceFunction.radius;
26758            }
26759
26760        }
26761        Object.defineProperties(interfaceFunction, {
26762            'radius': {
26763                get: ExpressionPropertyInterface(prop.rd)
26764            },
26765            '_name': { value: shape.nm }
26766        });
26767        interfaceFunction.mn = shape.mn;
26768        return interfaceFunction;
26769    }
26770
26771    function repeaterInterfaceFactory(shape,view,propertyGroup){
26772        function _propertyGroup(val){
26773            if(val == 1){
26774                return interfaceFunction;
26775            } else {
26776                return propertyGroup(--val);
26777            }
26778        }
26779        var prop = view;
26780        interfaceFunction.propertyIndex = shape.ix;
26781        prop.c.setGroupProperty(_propertyGroup);
26782        prop.o.setGroupProperty(_propertyGroup);
26783
26784        function interfaceFunction(value){
26785            if(shape.c.ix === value || 'Copies' === value){
26786                return interfaceFunction.copies;
26787            } else if(shape.o.ix === value || 'Offset' === value){
26788                return interfaceFunction.offset;
26789            }
26790
26791        }
26792        Object.defineProperties(interfaceFunction, {
26793            'copies': {
26794                get: ExpressionPropertyInterface(prop.c)
26795            },
26796            'offset': {
26797                get: ExpressionPropertyInterface(prop.o)
26798            },
26799            '_name': { value: shape.nm }
26800        });
26801        interfaceFunction.mn = shape.mn;
26802        return interfaceFunction;
26803    }
26804
26805    function pathInterfaceFactory(shape,view,propertyGroup){
26806        var prop = view.sh;
26807        function _propertyGroup(val){
26808            if(val == 1){
26809                return interfaceFunction;
26810            } else {
26811                return propertyGroup(--val);
26812            }
26813        }
26814        prop.setGroupProperty(_propertyGroup);
26815
26816        function interfaceFunction(val){
26817            if(val === 'Shape' || val === 'shape' || val === 'Path' || val === 'path' || val === 'ADBE Vector Shape' || val === 2){
26818                return interfaceFunction.path;
26819            }
26820        }
26821        Object.defineProperties(interfaceFunction, {
26822            'path': {
26823                get: function(){
26824                    if(prop.k){
26825                        prop.getValue();
26826                    }
26827                    return prop;
26828                }
26829            },
26830            'shape': {
26831                get: function(){
26832                    if(prop.k){
26833                        prop.getValue();
26834                    }
26835                    return prop;
26836                }
26837            },
26838            '_name': { value: shape.nm },
26839            'ix': { value: shape.ix },
26840            'propertyIndex': { value: shape.ix },
26841            'mn': { value: shape.mn }
26842        });
26843        return interfaceFunction;
26844    }
26845
26846    return function(shapes,view,propertyGroup) {
26847        var interfaces;
26848        function _interfaceFunction(value){
26849            if(typeof value === 'number'){
26850                return interfaces[value-1];
26851            } else {
26852                var i = 0, len = interfaces.length;
26853                while(i<len){
26854                    if(interfaces[i]._name === value){
26855                        return interfaces[i];
26856                    }
26857                    i+=1;
26858                }
26859            }
26860        }
26861        _interfaceFunction.propertyGroup = propertyGroup;
26862        interfaces = iterateElements(shapes, view, _interfaceFunction);
26863        _interfaceFunction.numProperties = interfaces.length;
26864        return _interfaceFunction;
26865    };
26866}());
26867
26868var TextExpressionInterface = (function(){
26869	return function(elem){
26870        var _prevValue, _sourceText;
26871        function _thisLayerFunction(){
26872        }
26873        Object.defineProperty(_thisLayerFunction, "sourceText", {
26874            get: function(){
26875                elem.textProperty.getValue()
26876                var stringValue = elem.textProperty.currentData.t;
26877                if(stringValue !== _prevValue) {
26878                    elem.textProperty.currentData.t = _prevValue;
26879                    _sourceText = new String(stringValue);
26880                    //If stringValue is an empty string, eval returns undefined, so it has to be returned as a String primitive
26881                    _sourceText.value = stringValue ? stringValue : new String(stringValue);
26882                }
26883                return _sourceText;
26884            }
26885        });
26886        return _thisLayerFunction;
26887    };
26888}());
26889var LayerExpressionInterface = (function (){
26890    function toWorld(arr, time){
26891        var toWorldMat = new Matrix();
26892        toWorldMat.reset();
26893        var transformMat;
26894        if(time) {
26895            //Todo implement value at time on transform properties
26896            //transformMat = this._elem.finalTransform.mProp.getValueAtTime(time);
26897            transformMat = this._elem.finalTransform.mProp;
26898        } else {
26899            transformMat = this._elem.finalTransform.mProp;
26900        }
26901        transformMat.applyToMatrix(toWorldMat);
26902        if(this._elem.hierarchy && this._elem.hierarchy.length){
26903            var i, len = this._elem.hierarchy.length;
26904            for(i=0;i<len;i+=1){
26905                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
26906            }
26907            return toWorldMat.applyToPointArray(arr[0],arr[1],arr[2]||0);
26908        }
26909        return toWorldMat.applyToPointArray(arr[0],arr[1],arr[2]||0);
26910    }
26911    function fromWorld(arr, time){
26912        var toWorldMat = new Matrix();
26913        toWorldMat.reset();
26914        var transformMat;
26915        if(time) {
26916            //Todo implement value at time on transform properties
26917            //transformMat = this._elem.finalTransform.mProp.getValueAtTime(time);
26918            transformMat = this._elem.finalTransform.mProp;
26919        } else {
26920            transformMat = this._elem.finalTransform.mProp;
26921        }
26922        transformMat.applyToMatrix(toWorldMat);
26923        if(this._elem.hierarchy && this._elem.hierarchy.length){
26924            var i, len = this._elem.hierarchy.length;
26925            for(i=0;i<len;i+=1){
26926                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
26927            }
26928            return toWorldMat.inversePoint(arr);
26929        }
26930        return toWorldMat.inversePoint(arr);
26931    }
26932    function fromComp(arr){
26933        var toWorldMat = new Matrix();
26934        toWorldMat.reset();
26935        this._elem.finalTransform.mProp.applyToMatrix(toWorldMat);
26936        if(this._elem.hierarchy && this._elem.hierarchy.length){
26937            var i, len = this._elem.hierarchy.length;
26938            for(i=0;i<len;i+=1){
26939                this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(toWorldMat);
26940            }
26941            return toWorldMat.inversePoint(arr);
26942        }
26943        return toWorldMat.inversePoint(arr);
26944    }
26945
26946    function sampleImage() {
26947        return [1,1,1,1];
26948    }
26949
26950
26951    return function(elem){
26952
26953        var transformInterface;
26954
26955        function _registerMaskInterface(maskManager){
26956            _thisLayerFunction.mask = new MaskManagerInterface(maskManager, elem);
26957        }
26958        function _registerEffectsInterface(effects){
26959            _thisLayerFunction.effect = effects;
26960        }
26961
26962        function _thisLayerFunction(name){
26963            switch(name){
26964                case "ADBE Root Vectors Group":
26965                case "Contents":
26966                case 2:
26967                    return _thisLayerFunction.shapeInterface;
26968                case 1:
26969                case 6:
26970                case "Transform":
26971                case "transform":
26972                case "ADBE Transform Group":
26973                    return transformInterface;
26974                case 4:
26975                case "ADBE Effect Parade":
26976                case "effects":
26977                case "Effects":
26978                    return _thisLayerFunction.effect;
26979            }
26980        }
26981        _thisLayerFunction.toWorld = toWorld;
26982        _thisLayerFunction.fromWorld = fromWorld;
26983        _thisLayerFunction.toComp = toWorld;
26984        _thisLayerFunction.fromComp = fromComp;
26985        _thisLayerFunction.sampleImage = sampleImage;
26986        _thisLayerFunction.sourceRectAtTime = elem.sourceRectAtTime.bind(elem);
26987        _thisLayerFunction._elem = elem;
26988        transformInterface = TransformExpressionInterface(elem.finalTransform.mProp);
26989        var anchorPointDescriptor = getDescriptor(transformInterface, 'anchorPoint');
26990        Object.defineProperties(_thisLayerFunction,{
26991            hasParent: {
26992                get: function(){
26993                    return elem.hierarchy.length;
26994                }
26995            },
26996            parent: {
26997                get: function(){
26998                    return elem.hierarchy[0].layerInterface;
26999                }
27000            },
27001            rotation: getDescriptor(transformInterface, 'rotation'),
27002            scale: getDescriptor(transformInterface, 'scale'),
27003            position: getDescriptor(transformInterface, 'position'),
27004            opacity: getDescriptor(transformInterface, 'opacity'),
27005            anchorPoint: anchorPointDescriptor,
27006            anchor_point: anchorPointDescriptor,
27007            transform: {
27008                get: function () {
27009                    return transformInterface;
27010                }
27011            },
27012            active: {
27013                get: function(){
27014                    return elem.isInRange;
27015                }
27016            }
27017        });
27018
27019        _thisLayerFunction.startTime = elem.data.st;
27020        _thisLayerFunction.index = elem.data.ind;
27021        _thisLayerFunction.source = elem.data.refId;
27022        _thisLayerFunction.height = elem.data.ty === 0 ? elem.data.h : 100;
27023        _thisLayerFunction.width = elem.data.ty === 0 ? elem.data.w : 100;
27024        _thisLayerFunction.inPoint = elem.data.ip/elem.comp.globalData.frameRate;
27025        _thisLayerFunction.outPoint = elem.data.op/elem.comp.globalData.frameRate;
27026        _thisLayerFunction._name = elem.data.nm;
27027
27028        _thisLayerFunction.registerMaskInterface = _registerMaskInterface;
27029        _thisLayerFunction.registerEffectsInterface = _registerEffectsInterface;
27030        return _thisLayerFunction;
27031    };
27032}());
27033
27034var CompExpressionInterface = (function () {
27035    return function(comp) {
27036        function _thisLayerFunction(name) {
27037            var i = 0, len = comp.layers.length;
27038            while ( i < len) {
27039                if (comp.layers[i].nm === name || comp.layers[i].ind === name) {
27040                    return comp.elements[i].layerInterface;
27041                }
27042                i += 1;
27043            }
27044            return null;
27045            //return {active:false};
27046        }
27047        Object.defineProperty(_thisLayerFunction, "_name", { value: comp.data.nm });
27048        _thisLayerFunction.layer = _thisLayerFunction;
27049        _thisLayerFunction.pixelAspect = 1;
27050        _thisLayerFunction.height = comp.data.h || comp.globalData.compSize.h;
27051        _thisLayerFunction.width = comp.data.w || comp.globalData.compSize.w;
27052        _thisLayerFunction.pixelAspect = 1;
27053        _thisLayerFunction.frameDuration = 1 / comp.globalData.frameRate;
27054        _thisLayerFunction.displayStartTime = 0;
27055        _thisLayerFunction.numLayers = comp.layers.length;
27056        return _thisLayerFunction;
27057    };
27058}());
27059var TransformExpressionInterface = (function (){
27060    return function(transform){
27061        function _thisFunction(name){
27062            switch(name){
27063                case "scale":
27064                case "Scale":
27065                case "ADBE Scale":
27066                case 6:
27067                    return _thisFunction.scale;
27068                case "rotation":
27069                case "Rotation":
27070                case "ADBE Rotation":
27071                case "ADBE Rotate Z":
27072                case 10:
27073                    return _thisFunction.rotation;
27074                case "ADBE Rotate X":
27075                    return _thisFunction.xRotation;
27076                case "ADBE Rotate Y":
27077                    return _thisFunction.yRotation;
27078                case "position":
27079                case "Position":
27080                case "ADBE Position":
27081                case 2:
27082                    return _thisFunction.position;
27083                case 'ADBE Position_0':
27084                    return _thisFunction.xPosition;
27085                case 'ADBE Position_1':
27086                    return _thisFunction.yPosition;
27087                case 'ADBE Position_2':
27088                    return _thisFunction.zPosition;
27089                case "anchorPoint":
27090                case "AnchorPoint":
27091                case "Anchor Point":
27092                case "ADBE AnchorPoint":
27093                case 1:
27094                    return _thisFunction.anchorPoint;
27095                case "opacity":
27096                case "Opacity":
27097                case 11:
27098                    return _thisFunction.opacity;
27099            }
27100        }
27101
27102        Object.defineProperty(_thisFunction, "rotation", {
27103            get: ExpressionPropertyInterface(transform.r || transform.rz)
27104        });
27105
27106        Object.defineProperty(_thisFunction, "zRotation", {
27107            get: ExpressionPropertyInterface(transform.rz || transform.r)
27108        });
27109
27110        Object.defineProperty(_thisFunction, "xRotation", {
27111            get: ExpressionPropertyInterface(transform.rx)
27112        });
27113
27114        Object.defineProperty(_thisFunction, "yRotation", {
27115            get: ExpressionPropertyInterface(transform.ry)
27116        });
27117        Object.defineProperty(_thisFunction, "scale", {
27118            get: ExpressionPropertyInterface(transform.s)
27119        });
27120
27121        if(transform.p) {
27122            var _transformFactory = ExpressionPropertyInterface(transform.p);
27123        }
27124        Object.defineProperty(_thisFunction, "position", {
27125            get: function () {
27126                if(transform.p) {
27127                    return _transformFactory();
27128                } else {
27129                    return [transform.px.v, transform.py.v, transform.pz ? transform.pz.v : 0];
27130                }
27131            }
27132        });
27133
27134        Object.defineProperty(_thisFunction, "xPosition", {
27135            get: ExpressionPropertyInterface(transform.px)
27136        });
27137
27138        Object.defineProperty(_thisFunction, "yPosition", {
27139            get: ExpressionPropertyInterface(transform.py)
27140        });
27141
27142        Object.defineProperty(_thisFunction, "zPosition", {
27143            get: ExpressionPropertyInterface(transform.pz)
27144        });
27145
27146        Object.defineProperty(_thisFunction, "anchorPoint", {
27147            get: ExpressionPropertyInterface(transform.a)
27148        });
27149
27150        Object.defineProperty(_thisFunction, "opacity", {
27151            get: ExpressionPropertyInterface(transform.o)
27152        });
27153
27154        Object.defineProperty(_thisFunction, "skew", {
27155            get: ExpressionPropertyInterface(transform.sk)
27156        });
27157
27158        Object.defineProperty(_thisFunction, "skewAxis", {
27159            get: ExpressionPropertyInterface(transform.sa)
27160        });
27161
27162        Object.defineProperty(_thisFunction, "orientation", {
27163            get: ExpressionPropertyInterface(transform.or)
27164        });
27165
27166        return _thisFunction;
27167    };
27168}());
27169var ProjectInterface = (function (){
27170
27171    function registerComposition(comp){
27172        this.compositions.push(comp);
27173    }
27174
27175    return function(){
27176        function _thisProjectFunction(name){
27177            var i = 0, len = this.compositions.length;
27178            while(i<len){
27179                if(this.compositions[i].data && this.compositions[i].data.nm === name){
27180                    if(this.compositions[i].prepareFrame && this.compositions[i].data.xt) {
27181                        this.compositions[i].prepareFrame(this.currentFrame);
27182                    }
27183                    return this.compositions[i].compInterface;
27184                }
27185                i+=1;
27186            }
27187        }
27188
27189        _thisProjectFunction.compositions = [];
27190        _thisProjectFunction.currentFrame = 0;
27191
27192        _thisProjectFunction.registerComposition = registerComposition;
27193
27194
27195
27196        return _thisProjectFunction;
27197    };
27198}());
27199var EffectsExpressionInterface = (function (){
27200    var ob = {
27201        createEffectsInterface: createEffectsInterface
27202    };
27203
27204    function createEffectsInterface(elem, propertyGroup){
27205        if(elem.effectsManager){
27206
27207            var effectElements = [];
27208            var effectsData = elem.data.ef;
27209            var i, len = elem.effectsManager.effectElements.length;
27210            for(i=0;i<len;i+=1){
27211                effectElements.push(createGroupInterface(effectsData[i],elem.effectsManager.effectElements[i],propertyGroup,elem));
27212            }
27213
27214            return function(name){
27215                var effects = elem.data.ef || [], i = 0, len = effects.length;
27216                while(i<len) {
27217                    if(name === effects[i].nm || name === effects[i].mn || name === effects[i].ix){
27218                        return effectElements[i];
27219                    }
27220                    i += 1;
27221                }
27222            };
27223        }
27224    }
27225
27226    function createGroupInterface(data,elements, propertyGroup, elem){
27227        var effectElements = [];
27228        var i, len = data.ef.length;
27229        for(i=0;i<len;i+=1){
27230            if(data.ef[i].ty === 5){
27231                effectElements.push(createGroupInterface(data.ef[i],elements.effectElements[i],elements.effectElements[i].propertyGroup, elem));
27232            } else {
27233                effectElements.push(createValueInterface(elements.effectElements[i],data.ef[i].ty, elem, _propertyGroup));
27234            }
27235        }
27236
27237        function _propertyGroup(val) {
27238            if(val === 1){
27239               return groupInterface;
27240            } else{
27241               return propertyGroup(val-1);
27242            }
27243        }
27244
27245        var groupInterface = function(name){
27246            var effects = data.ef, i = 0, len = effects.length;
27247            while(i<len) {
27248                if(name === effects[i].nm || name === effects[i].mn || name === effects[i].ix){
27249                    if(effects[i].ty === 5){
27250                        return effectElements[i];
27251                    } else {
27252                        return effectElements[i]();
27253                    }
27254                }
27255                i += 1;
27256            }
27257            return effectElements[0]();
27258        };
27259
27260        groupInterface.propertyGroup = _propertyGroup;
27261
27262        if(data.mn === 'ADBE Color Control'){
27263            Object.defineProperty(groupInterface, 'color', {
27264                get: function(){
27265                    return effectElements[0]();
27266                }
27267            });
27268        }
27269        Object.defineProperty(groupInterface, 'numProperties', {
27270            get: function(){
27271                return data.np;
27272            }
27273        });
27274        groupInterface.active = groupInterface.enabled = data.en !== 0;
27275        return groupInterface;
27276    }
27277
27278    function createValueInterface(element, type, elem, propertyGroup){
27279        var expressionProperty = ExpressionPropertyInterface(element.p);
27280        function interfaceFunction(){
27281            if(type === 10){
27282                return elem.comp.compInterface(element.p.v);
27283            }
27284            return expressionProperty();
27285        }
27286
27287        if(element.p.setGroupProperty) {
27288            element.p.setGroupProperty(propertyGroup);
27289        }
27290
27291        return interfaceFunction;
27292    }
27293
27294    return ob;
27295
27296}());
27297var MaskManagerInterface = (function(){
27298
27299	function MaskInterface(mask, data){
27300		this._mask = mask;
27301		this._data = data;
27302	}
27303	Object.defineProperty(MaskInterface.prototype, 'maskPath', {
27304        get: function(){
27305            if(this._mask.prop.k){
27306                this._mask.prop.getValue();
27307            }
27308            return this._mask.prop;
27309        }
27310    });
27311	Object.defineProperty(MaskInterface.prototype, 'maskOpacity', {
27312        get: function(){
27313            if(this._mask.op.k){
27314                this._mask.op.getValue();
27315            }
27316            return this._mask.op.v * 100;
27317        }
27318    });
27319
27320	var MaskManager = function(maskManager, elem){
27321		var _maskManager = maskManager;
27322		var _elem = elem;
27323		var _masksInterfaces = createSizedArray(maskManager.viewData.length);
27324		var i, len = maskManager.viewData.length;
27325		for(i = 0; i < len; i += 1) {
27326			_masksInterfaces[i] = new MaskInterface(maskManager.viewData[i], maskManager.masksProperties[i]);
27327		}
27328
27329		var maskFunction = function(name){
27330			i = 0;
27331		    while(i<len){
27332		        if(maskManager.masksProperties[i].nm === name){
27333		            return _masksInterfaces[i];
27334		        }
27335		        i += 1;
27336		    }
27337		};
27338		return maskFunction;
27339	};
27340	return MaskManager;
27341}());
27342
27343var ExpressionPropertyInterface = (function() {
27344
27345    var defaultUnidimensionalValue = {pv:0, v:0, mult: 1}
27346    var defaultMultidimensionalValue = {pv:[0,0,0], v:[0,0,0], mult: 1}
27347
27348    function completeProperty(expressionValue, property, type) {
27349        Object.defineProperty(expressionValue, 'velocity', {
27350            get: function(){
27351                return property.getVelocityAtTime(property.comp.currentFrame);
27352            }
27353        });
27354        expressionValue.numKeys = property.keyframes ? property.keyframes.length : 0;
27355        expressionValue.key = function(pos) {
27356            if (!expressionValue.numKeys) {
27357                return 0;
27358            } else {
27359                var value = '';
27360                if ('s' in property.keyframes[pos-1]) {
27361                    value = property.keyframes[pos-1].s;
27362                } else if ('e' in property.keyframes[pos-2]) {
27363                    value = property.keyframes[pos-2].e;
27364                } else {
27365                    value = property.keyframes[pos-2].s;
27366                }
27367                var valueProp = type === 'unidimensional' ? new Number(value) : Object.assign({}, value);
27368                valueProp.time = property.keyframes[pos-1].t / property.elem.comp.globalData.frameRate;
27369                return valueProp;
27370            }
27371        };
27372        expressionValue.valueAtTime = property.getValueAtTime;
27373        expressionValue.speedAtTime = property.getSpeedAtTime;
27374        expressionValue.velocityAtTime = property.getVelocityAtTime;
27375        expressionValue.propertyGroup = property.propertyGroup;
27376    }
27377
27378    function UnidimensionalPropertyInterface(property) {
27379        if(!property || !('pv' in property)) {
27380            property = defaultUnidimensionalValue;
27381        }
27382        var mult = 1 / property.mult;
27383        var val = property.pv * mult;
27384        var expressionValue = new Number(val);
27385        expressionValue.value = val;
27386        completeProperty(expressionValue, property, 'unidimensional');
27387
27388        return function() {
27389            if (property.k) {
27390                property.getValue();
27391            }
27392            val = property.v * mult;
27393            if(expressionValue.value !== val) {
27394                expressionValue = new Number(val);
27395                expressionValue.value = val;
27396                completeProperty(expressionValue, property, 'unidimensional');
27397            }
27398            return expressionValue;
27399        }
27400    }
27401
27402    function MultidimensionalPropertyInterface(property) {
27403        if(!property || !('pv' in property)) {
27404            property = defaultMultidimensionalValue;
27405        }
27406        var mult = 1 / property.mult;
27407        var len = property.pv.length;
27408        var expressionValue = createTypedArray('float32', len);
27409        var arrValue = createTypedArray('float32', len);
27410        expressionValue.value = arrValue;
27411        completeProperty(expressionValue, property, 'multidimensional');
27412
27413        return function() {
27414            if (property.k) {
27415                property.getValue();
27416            }
27417            for (var i = 0; i < len; i += 1) {
27418                expressionValue[i] = arrValue[i] = property.v[i] * mult;
27419            }
27420            return expressionValue;
27421        }
27422    }
27423
27424    //TODO: try to avoid using this getter
27425    function defaultGetter() {
27426        return defaultUnidimensionalValue;
27427    }
27428    
27429    return function(property) {
27430        if(!property) {
27431            return defaultGetter;
27432        } else if (property.propType === 'unidimensional') {
27433            return UnidimensionalPropertyInterface(property);
27434        } else {
27435            return MultidimensionalPropertyInterface(property);
27436        }
27437    }
27438}());
27439
27440(function(){
27441
27442    var TextExpressionSelectorProp = (function(){
27443
27444        function getValueProxy(index,total){
27445            this.textIndex = index+1;
27446            this.textTotal = total;
27447            this.v = this.getValue() * this.mult;
27448            return this.v;
27449        }
27450
27451        return function TextExpressionSelectorProp(elem,data){
27452            this.pv = 1;
27453            this.comp = elem.comp;
27454            this.elem = elem;
27455            this.mult = 0.01;
27456            this.propType = 'textSelector';
27457            this.textTotal = data.totalChars;
27458            this.selectorValue = 100;
27459            this.lastValue = [1,1,1];
27460            this.k = true;
27461            this.x = true;
27462            this.getValue = ExpressionManager.initiateExpression.bind(this)(elem,data,this);
27463            this.getMult = getValueProxy;
27464            this.getVelocityAtTime = expressionHelpers.getVelocityAtTime;
27465            if(this.kf){
27466                this.getValueAtTime = expressionHelpers.getValueAtTime.bind(this);
27467            } else {
27468                this.getValueAtTime = expressionHelpers.getStaticValueAtTime.bind(this);
27469            }
27470            this.setGroupProperty = expressionHelpers.setGroupProperty;
27471        };
27472    }());
27473
27474	var propertyGetTextProp = TextSelectorProp.getTextSelectorProp;
27475	TextSelectorProp.getTextSelectorProp = function(elem, data,arr){
27476	    if(data.t === 1){
27477	        return new TextExpressionSelectorProp(elem, data,arr);
27478	    } else {
27479	        return propertyGetTextProp(elem,data,arr);
27480	    }
27481	};
27482}());
27483function SliderEffect(data,elem, container){
27484    this.p = PropertyFactory.getProp(elem,data.v,0,0,container);
27485}
27486function AngleEffect(data,elem, container){
27487    this.p = PropertyFactory.getProp(elem,data.v,0,0,container);
27488}
27489function ColorEffect(data,elem, container){
27490    this.p = PropertyFactory.getProp(elem,data.v,1,0,container);
27491}
27492function PointEffect(data,elem, container){
27493    this.p = PropertyFactory.getProp(elem,data.v,1,0,container);
27494}
27495function LayerIndexEffect(data,elem, container){
27496    this.p = PropertyFactory.getProp(elem,data.v,0,0,container);
27497}
27498function MaskIndexEffect(data,elem, container){
27499    this.p = PropertyFactory.getProp(elem,data.v,0,0,container);
27500}
27501function CheckboxEffect(data,elem, container){
27502    this.p = PropertyFactory.getProp(elem,data.v,0,0,container);
27503}
27504function NoValueEffect(){
27505    this.p = {};
27506}
27507function EffectsManager(){}
27508function EffectsManager(data,element){
27509    var effects = data.ef || [];
27510    this.effectElements = [];
27511    var i,len = effects.length;
27512    var effectItem;
27513    for(i=0;i<len;i++) {
27514        effectItem = new GroupEffect(effects[i],element);
27515        this.effectElements.push(effectItem);
27516    }
27517}
27518
27519function GroupEffect(data,element){
27520    this.init(data,element);
27521}
27522
27523extendPrototype([DynamicPropertyContainer], GroupEffect);
27524
27525GroupEffect.prototype.getValue = GroupEffect.prototype.iterateDynamicProperties;
27526
27527GroupEffect.prototype.init = function(data,element){
27528    this.data = data;
27529    this.effectElements = [];
27530    this.initDynamicPropertyContainer(element);
27531    var i, len = this.data.ef.length;
27532    var eff, effects = this.data.ef;
27533    for(i=0;i<len;i+=1){
27534        eff = null;
27535        switch(effects[i].ty){
27536            case 0:
27537                eff = new SliderEffect(effects[i],element,this);
27538                break;
27539            case 1:
27540                eff = new AngleEffect(effects[i],element,this);
27541                break;
27542            case 2:
27543                eff = new ColorEffect(effects[i],element,this);
27544                break;
27545            case 3:
27546                eff = new PointEffect(effects[i],element,this);
27547                break;
27548            case 4:
27549            case 7:
27550                eff = new CheckboxEffect(effects[i],element,this);
27551                break;
27552            case 10:
27553                eff = new LayerIndexEffect(effects[i],element,this);
27554                break;
27555            case 11:
27556                eff = new MaskIndexEffect(effects[i],element,this);
27557                break;
27558            case 5:
27559                eff = new EffectsManager(effects[i],element,this);
27560                break;
27561            //case 6:
27562            default:
27563                eff = new NoValueEffect(effects[i],element,this);
27564                break;
27565        }
27566        if(eff) {
27567            this.effectElements.push(eff);
27568        }
27569    }
27570};
27571
27572    var lottiejs = {};
27573
27574    var _isFrozen = false;
27575
27576    function setLocationHref (href) {
27577        locationHref = href;
27578    }
27579
27580    function searchAnimations() {
27581        if (standalone === true) {
27582            animationManager.searchAnimations(animationData, standalone, renderer);
27583        } else {
27584            animationManager.searchAnimations();
27585        }
27586    }
27587
27588    function setSubframeRendering(flag) {
27589        subframeEnabled = flag;
27590    }
27591
27592    function loadAnimation(params) {
27593        if (standalone === true) {
27594            params.animationData = JSON.parse(animationData);
27595        }
27596        return animationManager.loadAnimation(params);
27597    }
27598
27599    function setQuality(value) {
27600        if (typeof value === 'string') {
27601            switch (value) {
27602                case 'high':
27603                    defaultCurveSegments = 200;
27604                    break;
27605                case 'medium':
27606                    defaultCurveSegments = 50;
27607                    break;
27608                case 'low':
27609                    defaultCurveSegments = 10;
27610                    break;
27611            }
27612        } else if (!isNaN(value) && value > 1) {
27613            defaultCurveSegments = value;
27614        }
27615        if (defaultCurveSegments >= 50) {
27616            roundValues(false);
27617        } else {
27618            roundValues(true);
27619        }
27620    }
27621
27622    function inBrowser() {
27623        return typeof navigator !== 'undefined';
27624    }
27625
27626    function installPlugin(type, plugin) {
27627        if (type === 'expressions') {
27628            expressionsPlugin = plugin;
27629        }
27630    }
27631
27632    function getFactory(name) {
27633        switch (name) {
27634            case "propertyFactory":
27635                return PropertyFactory;
27636            case "shapePropertyFactory":
27637                return ShapePropertyFactory;
27638            case "matrix":
27639                return Matrix;
27640        }
27641    }
27642
27643    lottiejs.play = animationManager.play;
27644    lottiejs.pause = animationManager.pause;
27645    lottiejs.setLocationHref = setLocationHref;
27646    lottiejs.togglePause = animationManager.togglePause;
27647    lottiejs.setSpeed = animationManager.setSpeed;
27648    lottiejs.setDirection = animationManager.setDirection;
27649    lottiejs.stop = animationManager.stop;
27650    lottiejs.searchAnimations = searchAnimations;
27651    lottiejs.registerAnimation = animationManager.registerAnimation;
27652    lottiejs.loadAnimation = loadAnimation;
27653    lottiejs.setSubframeRendering = setSubframeRendering;
27654    lottiejs.resize = animationManager.resize;
27655    //lottiejs.start = start;
27656    lottiejs.goToAndStop = animationManager.goToAndStop;
27657    lottiejs.destroy = animationManager.destroy;
27658    lottiejs.setQuality = setQuality;
27659    lottiejs.inBrowser = inBrowser;
27660    lottiejs.installPlugin = installPlugin;
27661    lottiejs.freeze = animationManager.freeze;
27662    lottiejs.unfreeze = animationManager.unfreeze;
27663    lottiejs.getRegisteredAnimations = animationManager.getRegisteredAnimations;
27664    lottiejs.__getFactory = getFactory;
27665    lottiejs.version = '5.5.9';
27666
27667    function checkReady() {
27668        if (document.readyState === "complete") {
27669            clearInterval(readyStateCheckInterval);
27670            searchAnimations();
27671        }
27672    }
27673
27674    function getQueryVariable(variable) {
27675        var vars = queryString.split('&');
27676        for (var i = 0; i < vars.length; i++) {
27677            var pair = vars[i].split('=');
27678            if (decodeURIComponent(pair[0]) == variable) {
27679                return decodeURIComponent(pair[1]);
27680            }
27681        }
27682    }
27683    var standalone = '__[STANDALONE]__';
27684    var animationData = '__[ANIMATIONDATA]__';
27685    var renderer = '';
27686    if (standalone) {
27687        var scripts = document.getElementsByTagName('script');
27688        var index = scripts.length - 1;
27689        var myScript = scripts[index] || {
27690            src: ''
27691        };
27692        var queryString = myScript.src.replace(/^[^\?]+\??/, '');
27693        renderer = getQueryVariable('renderer');
27694    }
27695    var readyStateCheckInterval = setInterval(checkReady, 100);
27696    return lottiejs;
27697}));
27698
27699
27700/***/ }),
27701/* 286 */
27702/***/ (function(module, exports, __webpack_require__) {
27703
27704"use strict";
27705 // @wf-will-never-add-flow-to-this-file
27706
27707/* globals document, window, navigator */
27708
27709/* eslint-disable no-var */
27710
27711/**
27712 * Webflow: Brand pages on the subdomain
27713 */
27714
27715var Webflow = __webpack_require__(9);
27716
27717Webflow.define('brand', module.exports = function ($) {
27718  var api = {};
27719  var doc = document;
27720  var $html = $('html');
27721  var $body = $('body');
27722  var namespace = '.w-webflow-badge';
27723  var location = window.location;
27724  var isPhantom = /PhantomJS/i.test(navigator.userAgent);
27725  var fullScreenEvents = 'fullscreenchange webkitfullscreenchange mozfullscreenchange msfullscreenchange';
27726  var brandElement; // -----------------------------------
27727  // Module methods
27728
27729  api.ready = function () {
27730    var shouldBrand = $html.attr('data-wf-status');
27731    var publishedDomain = $html.attr('data-wf-domain') || '';
27732
27733    if (/\.webflow\.io$/i.test(publishedDomain) && location.hostname !== publishedDomain) {
27734      shouldBrand = true;
27735    }
27736
27737    if (shouldBrand && !isPhantom) {
27738      brandElement = brandElement || createBadge();
27739      ensureBrand();
27740      setTimeout(ensureBrand, 500);
27741      $(doc).off(fullScreenEvents, onFullScreenChange).on(fullScreenEvents, onFullScreenChange);
27742    }
27743  };
27744
27745  function onFullScreenChange() {
27746    var fullScreen = doc.fullScreen || doc.mozFullScreen || doc.webkitIsFullScreen || doc.msFullscreenElement || Boolean(doc.webkitFullscreenElement);
27747    $(brandElement).attr('style', fullScreen ? 'display: none !important;' : '');
27748  }
27749
27750  function createBadge() {
27751    var $brand = $('<a class="w-webflow-badge"></a>').attr('href', 'https://webflow.com?utm_campaign=brandjs');
27752    var $logoArt = $('<img>').attr('src', 'https://d3e54v103j8qbb.cloudfront.net/img/webflow-badge-icon.f67cd735e3.svg').attr('alt', '').css({
27753      marginRight: '8px',
27754      width: '16px'
27755    });
27756    var $logoText = $('<img>').attr('src', 'https://d1otoma47x30pg.cloudfront.net/img/webflow-badge-text.6faa6a38cd.svg').attr('alt', 'Made in Webflow');
27757    $brand.append($logoArt, $logoText);
27758    return $brand[0];
27759  }
27760
27761  function ensureBrand() {
27762    var found = $body.children(namespace);
27763    var match = found.length && found.get(0) === brandElement;
27764    var inEditor = Webflow.env('editor');
27765
27766    if (match) {
27767      // Remove brand when Editor is active
27768      if (inEditor) {
27769        found.remove();
27770      } // Exit early, brand is in place
27771
27772
27773      return;
27774    }
27774 // Remove any invalid brand elements
27775
27776
27777    if (found.length) {
27778      found.remove();
27779    } // Append the brand (unless Editor is active)
27780
27781
27782    if (!inEditor) {
27783      $body.append(brandElement);
27784    }
27785  } // Export module
27786
27787
27788  return api;
27789});
27790
27791/***/ }),
27792/* 287 */
27793/***/ (function(module, exports, __webpack_require__) {
27794
27795"use strict";
27796// @wf-will-never-add-flow-to-this-file
27797
27798/* globals window */
27799
27800/* eslint-disable no-var */
27801
27802/**
27803 * Webflow: IX Event triggers for other modules
27804 */
27805// eslint-disable-next-line strict
27806
27807
27808var $ = window.jQuery;
27809var api = {};
27810var eventQueue = [];
27811var namespace = '.w-ix';
27812var eventTriggers = {
27813  reset: function reset(i, el) {
27814    el.__wf_intro = null;
27815  },
27816  intro: function intro(i, el) {
27817    if (el.__wf_intro) {
27818      return;
27819    }
27820
27821    el.__wf_intro = true;
27822    $(el).triggerHandler(api.types.INTRO);
27823  },
27824  outro: function outro(i, el) {
27825    if (!el.__wf_intro) {
27826      return;
27827    }
27828
27829    el.__wf_intro = null;
27830    $(el).triggerHandler(api.types.OUTRO);
27831  }
27832};
27833api.triggers = {};
27834api.types = {
27835  INTRO: 'w-ix-intro' + namespace,
27836  OUTRO: 'w-ix-outro' + namespace
27837}; // Trigger any events in queue + restore trigger methods
27838
27839api.init = function () {
27840  var count = eventQueue.length;
27841
27842  for (var i = 0; i < count; i++) {
27843    var memo = eventQueue[i];
27844    memo[0](0, memo[1]);
27845  }
27846
27847  eventQueue = [];
27848  $.extend(api.triggers, eventTriggers);
27849}; // Replace all triggers with async wrapper to queue events until init
27850
27851
27852api.async = function () {
27853  for (var key in eventTriggers) {
27854    var func = eventTriggers[key];
27855
27856    if (!eventTriggers.hasOwnProperty(key)) {
27857      continue;
27858    } // Replace trigger method with async wrapper
27859
27860
27861    api.triggers[key] = function (i, el) {
27862      eventQueue.push([func, el]);
27863    };
27864  }
27865}; // Default triggers to async queue
27866
27867
27868api.async();
27869module.exports = api;
27870
27871/***/ }),
27872/* 288 */
27873/***/ (function(module, exports, __webpack_require__) {
27874
27875"use strict";
27876 // @wf-will-never-add-flow-to-this-file
27877
27878/* eslint-disable no-var */
27879
27880/**
27881 * Webflow: Interactions 2
27882 */
27883
27884var Webflow = __webpack_require__(9);
27885
27886var ix2 = __webpack_require__(289);
27887
27888ix2.setEnv(Webflow.env);
27889Webflow.define('ix2', module.exports = function () {
27890  return ix2;
27891});
27892
27893/***/ }),
27894/* 289 */
27895/***/ (function(module, exports, __webpack_require__) {
27896
27897"use strict";
27898
27899
27900var _interopRequireWildcard = __webpack_require__(39);
27901
27902var _interopRequireDefault = __webpack_require__(1);
27903
27904Object.defineProperty(exports, "__esModule", {
27905  value: true
27906});
27907exports.setEnv = setEnv;
27908exports.init = init;
27909exports.destroy = destroy;
27910exports.actions = exports.store = void 0;
27911
27912__webpack_require__(290);
27913
27914var _redux = __webpack_require__(128);
27915
27916var _IX2Reducer = _interopRequireDefault(__webpack_require__(304));
27917
27918var _IX2VanillaEngine = __webpack_require__(145);
27919
27920var actions = _interopRequireWildcard(__webpack_require__(87));
27921
27922exports.actions = actions; // Array.includes needed for IE11 @packages/systems/ix2/shared/utils/quick-effects
27923
27924var store = (0, _redux.createStore)(_IX2Reducer["default"]);
27925exports.store = store;
27926
27927function setEnv(env) {
27928  if (env()) {
27929    (0, _IX2VanillaEngine.observeRequests)(store);
27930  }
27931}
27932
27933function init(rawData) {
27934  destroy();
27935  (0, _IX2VanillaEngine.startEngine)({
27936    store: store,
27937    rawData: rawData,
27938    allowEvents: true
27939  });
27940}
27941
27942function destroy() {
27943  (0, _IX2VanillaEngine.stopEngine)(store);
27944}
27945
27946/***/ }),
27947/* 290 */
27948/***/ (function(module, exports, __webpack_require__) {
27949
27950module.exports = __webpack_require__(291);
27951
27952
27953/***/ }),
27954/* 291 */
27955/***/ (function(module, exports, __webpack_require__) {
27956
27957__webpack_require__(126);
27958var entryUnbind = __webpack_require__(292);
27959
27960module.exports = entryUnbind('Array', 'includes');
27961
27962
27963/***/ }),
27964/* 292 */
27965/***/ (function(module, exports, __webpack_require__) {
27966
27967var global = __webpack_require__(7);
27968var bind = __webpack_require__(54);
27969
27970var call = Function.call;
27971
27972module.exports = function (CONSTRUCTOR, METHOD, length) {
27973  return bind(call, global[CONSTRUCTOR].prototype[METHOD], length);
27974};
27975
27976
27977/***/ }),
27978/* 293 */
27979/***/ (function(module, __webpack_exports__, __webpack_require__) {
27980
27981"use strict";
27982__webpack_require__.r(__webpack_exports__);
27983/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(130);
27984/* harmony import */ var _getRawTag_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(296);
27985/* harmony import */ var _objectToString_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(297);
27986
27987
27988
27989
27990/** `Object#toString` result references. */
27991var nullTag = '[object Null]',
27992    undefinedTag = '[object Undefined]';
27993
27994/** Built-in value references. */
27995var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined;
27996
27997/**
27998 * The base implementation of `getTag` without fallbacks for buggy environments.
27999 *
28000 * @private
28001 * @param {*} value The value to query.
28002 * @returns {string} Returns the `toStringTag`.
28003 */
28004function baseGetTag(value) {
28005  if (value == null) {
28006    return value === undefined ? undefinedTag : nullTag;
28007  }
28008  return (symToStringTag && symToStringTag in Object(value))
28009    ? Object(_getRawTag_js__WEBPACK_IMPORTED_MODULE_1__["default"])(value)
28010    : Object(_objectToString_js__WEBPACK_IMPORTED_MODULE_2__["default"])(value);
28011}
28012
28013/* harmony default export */ __webpack_exports__["default"] = (baseGetTag);
28014
28015
28016/***/ }),
28017/* 294 */
28018/***/ (function(module, __webpack_exports__, __webpack_require__) {
28019
28020"use strict";
28021__webpack_require__.r(__webpack_exports__);
28022/* harmony import */ var _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(295);
28023
28024
28025/** Detect free variable `self`. */
28026var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
28027
28028/** Used as a reference to the global object. */
28029var root = _freeGlobal_js__WEBPACK_IMPORTED_MODULE_0__["default"] || freeSelf || Function('return this')();
28030
28031/* harmony default export */ __webpack_exports__["default"] = (root);
28032
28033
28034/***/ }),
28035/* 295 */
28036/***/ (function(module, __webpack_exports__, __webpack_require__) {
28037
28038"use strict";
28039__webpack_require__.r(__webpack_exports__);
28040/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
28041var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
28042
28043/* harmony default export */ __webpack_exports__["default"] = (freeGlobal);
28044
28045/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44)))
28046
28047/***/ }),
28048/* 296 */
28049/***/ (function(module, __webpack_exports__, __webpack_require__) {
28050
28051"use strict";
28052__webpack_require__.r(__webpack_exports__);
28053/* harmony import */ var _Symbol_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(130);
28054
28055
28056/** Used for built-in method references. */
28057var objectProto = Object.prototype;
28058
28059/** Used to check objects for own properties. */
28060var hasOwnProperty = objectProto.hasOwnProperty;
28061
28062/**
28063 * Used to resolve the
28064 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
28065 * of values.
28066 */
28067var nativeObjectToString = objectProto.toString;
28068
28069/** Built-in value references. */
28070var symToStringTag = _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"] ? _Symbol_js__WEBPACK_IMPORTED_MODULE_0__["default"].toStringTag : undefined;
28071
28072/**
28073 * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
28074 *
28075 * @private
28076 * @param {*} value The value to query.
28077 * @returns {string} Returns the raw `toStringTag`.
28078 */
28079function getRawTag(value) {
28080  var isOwn = hasOwnProperty.call(value, symToStringTag),
28081      tag = value[symToStringTag];
28082
28083  try {
28084    value[symToStringTag] = undefined;
28085    var unmasked = true;
28086  } catch (e) {}
28087
28088  var result = nativeObjectToString.call(value);
28089  if (unmasked) {
28090    if (isOwn) {
28091      value[symToStringTag] = tag;
28092    } else {
28093      delete value[symToStringTag];
28094    }
28095  }
28096  return result;
28097}
28098
28099/* harmony default export */ __webpack_exports__["default"] = (getRawTag);
28100
28101
28102/***/ }),
28103/* 297 */
28104/***/ (function(module, __webpack_exports__, __webpack_require__) {
28105
28106"use strict";
28107__webpack_require__.r(__webpack_exports__);
28108/** Used for built-in method references. */
28109var objectProto = Object.prototype;
28110
28111/**
28112 * Used to resolve the
28113 * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
28114 * of values.
28115 */
28116var nativeObjectToString = objectProto.toString;
28117
28118/**
28119 * Converts `value` to a string using `Object.prototype.toString`.
28120 *
28121 * @private
28122 * @param {*} value The value to convert.
28123 * @returns {string} Returns the converted string.
28124 */
28125function objectToString(value) {
28126  return nativeObjectToString.call(value);
28127}
28128
28129/* harmony default export */ __webpack_exports__["default"] = (objectToString);
28130
28131
28132/***/ }),
28133/* 298 */
28134/***/ (function(module, __webpack_exports__, __webpack_require__) {
28135
28136"use strict";
28137__webpack_require__.r(__webpack_exports__);
28138/* harmony import */ var _overArg_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(299);
28139
28140
28141/** Built-in value references. */
28142var getPrototype = Object(_overArg_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object.getPrototypeOf, Object);
28143
28144/* harmony default export */ __webpack_exports__["default"] = (getPrototype);
28145
28146
28147/***/ }),
28148/* 299 */
28149/***/ (function(module, __webpack_exports__, __webpack_require__) {
28150
28151"use strict";
28152__webpack_require__.r(__webpack_exports__);
28153/**
28154 * Creates a unary function that invokes `func` with its argument transformed.
28155 *
28156 * @private
28157 * @param {Function} func The function to wrap.
28158 * @param {Function} transform The argument transform.
28159 * @returns {Function} Returns the new function.
28160 */
28161function overArg(func, transform) {
28162  return function(arg) {
28163    return func(transform(arg));
28164  };
28165}
28166
28167/* harmony default export */ __webpack_exports__["default"] = (overArg);
28168
28169
28170/***/ }),
28171/* 300 */
28172/***/ (function(module, __webpack_exports__, __webpack_require__) {
28173
28174"use strict";
28175__webpack_require__.r(__webpack_exports__);
28176/**
28177 * Checks if `value` is object-like. A value is object-like if it's not `null`
28178 * and has a `typeof` result of "object".
28179 *
28180 * @static
28181 * @memberOf _
28182 * @since 4.0.0
28183 * @category Lang
28184 * @param {*} value The value to check.
28185 * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
28186 * @example
28187 *
28188 * _.isObjectLike({});
28189 * // => true
28190 *
28191 * _.isObjectLike([1, 2, 3]);
28192 * // => true
28193 *
28194 * _.isObjectLike(_.noop);
28195 * // => false
28196 *
28197 * _.isObjectLike(null);
28198 * // => false
28199 */
28200function isObjectLike(value) {
28201  return value != null && typeof value == 'object';
28202}
28203
28204/* harmony default export */ __webpack_exports__["default"] = (isObjectLike);
28205
28206
28207/***/ }),
28208/* 301 */
28209/***/ (function(module, __webpack_exports__, __webpack_require__) {
28210
28211"use strict";
28212__webpack_require__.r(__webpack_exports__);
28213/* WEBPACK VAR INJECTION */(function(global, module) {/* harmony import */ var _ponyfill_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(303);
28214/* global window */
28215
28216
28217var root;
28218
28219if (typeof self !== 'undefined') {
28220  root = self;
28221} else if (typeof window !== 'undefined') {
28222  root = window;
28223} else if (typeof global !== 'undefined') {
28224  root = global;
28225} else if (true) {
28226  root = module;
28227} else {}
28228
28229var result = Object(_ponyfill_js__WEBPACK_IMPORTED_MODULE_0__["default"])(root);
28230/* harmony default export */ __webpack_exports__["default"] = (result);
28231
28232/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(44), __webpack_require__(302)(module)))
28233
28234/***/ }),
28235/* 302 */
28236/***/ (function(module, exports) {
28237
28238module.exports = function(originalModule) {
28239	if (!originalModule.webpackPolyfill) {
28240		var module = Object.create(originalModule);
28241		// module.parent = undefined by default
28242		if (!module.children) module.children = [];
28243		Object.defineProperty(module, "loaded", {
28244			enumerable: true,
28245			get: function() {
28246				return module.l;
28247			}
28248		});
28249		Object.defineProperty(module, "id", {
28250			enumerable: true,
28251			get: function() {
28252				return module.i;
28253			}
28254		});
28255		Object.defineProperty(module, "exports", {
28256			enumerable: true
28257		});
28258		module.webpackPolyfill = 1;
28259	}
28260	return module;
28261};
28262
28263
28264/***/ }),
28265/* 303 */
28266/***/ (function(module, __webpack_exports__, __webpack_require__) {
28267
28268"use strict";
28269__webpack_require__.r(__webpack_exports__);
28270/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return symbolObservablePonyfill; });
28271function symbolObservablePonyfill(root) {
28272	var result;
28273	var Symbol = root.Symbol;
28274
28275	if (typeof Symbol === 'function') {
28276		if (Symbol.observable) {
28277			result = Symbol.observable;
28278		} else {
28279			result = Symbol('observable');
28280			Symbol.observable = result;
28281		}
28282	} else {
28283		result = '@@observable';
28284	}
28285
28286	return result;
28287};
28288
28289
28290/***/ }),
28291/* 304 */
28292/***/ (function(module, exports, __webpack_require__) {
28293
28294"use strict";
28295
28296
28297Object.defineProperty(exports, "__esModule", {
28298  value: true
28299});
28300exports["default"] = void 0;
28301
28302var _redux = __webpack_require__(128);
28303
28304var _IX2DataReducer = __webpack_require__(305);
28305
28306var _IX2RequestReducer = __webpack_require__(311);
28307
28308var _IX2SessionReducer = __webpack_require__(312);
28309
28310var _shared = __webpack_require__(29);
28311
28312var _IX2InstancesReducer = __webpack_require__(330);
28313
28314var _IX2ParametersReducer = __webpack_require__(331);
28315
28316var ixElements = _shared.IX2ElementsReducer.ixElements;
28317
28318var _default = (0, _redux.combineReducers)({
28319  ixData: _IX2DataReducer.ixData,
28320  ixRequest: _IX2RequestReducer.ixRequest,
28321  ixSession: _IX2SessionReducer.ixSession,
28322  ixElements: ixElements,
28323  ixInstances: _IX2InstancesReducer.ixInstances,
28324  ixParameters: _IX2ParametersReducer.ixParameters
28325});
28326
28327exports["default"] = _default;
28328
28329/***/ }),
28330/* 305 */
28331/***/ (function(module, exports, __webpack_require__) {
28332
28333"use strict";
28334
28335
28336Object.defineProperty(exports, "__esModule", {
28337  value: true
28338});
28339exports.ixData = void 0;
28340
28341var _constants = __webpack_require__(6);
28342
28343var IX2_RAW_DATA_IMPORTED = _constants.IX2EngineActionTypes.IX2_RAW_DATA_IMPORTED;
28344
28345var ixData = function ixData() {
28346  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Object.freeze({});
28347  var action = arguments.length > 1 ? arguments[1] : undefined;
28348
28349  switch (action.type) {
28350    case IX2_RAW_DATA_IMPORTED:
28351      {
28352        return action.payload.ixData || Object.freeze({});
28353      }
28354
28355    default:
28356      {
28357        return state;
28358      }
28359  }
28360};
28361
28362exports.ixData = ixData;
28363
28364/***/ }),
28365/* 306 */
28366/***/ (function(module, exports, __webpack_require__) {
28367
28368"use strict";
28369
28370
28371Object.defineProperty(exports, "__esModule", {
28372  value: true
28373});
28374exports.QuickEffectDirectionConsts = exports.QuickEffectIds = exports.EventLimitAffectedElements = exports.EventContinuousMouseAxes = exports.EventBasedOn = exports.EventAppliesTo = exports.EventTypeConsts = void 0;
28375/**
28376 * Event Type IDs
28377 */
28378
28379var EventTypeConsts = {
28380  NAVBAR_OPEN: 'NAVBAR_OPEN',
28381  NAVBAR_CLOSE: 'NAVBAR_CLOSE',
28382  TAB_ACTIVE: 'TAB_ACTIVE',
28383  TAB_INACTIVE: 'TAB_INACTIVE',
28384  SLIDER_ACTIVE: 'SLIDER_ACTIVE',
28385  SLIDER_INACTIVE: 'SLIDER_INACTIVE',
28386  DROPDOWN_OPEN: 'DROPDOWN_OPEN',
28387  DROPDOWN_CLOSE: 'DROPDOWN_CLOSE',
28388  MOUSE_CLICK: 'MOUSE_CLICK',
28389  MOUSE_SECOND_CLICK: 'MOUSE_SECOND_CLICK',
28390  MOUSE_DOWN: 'MOUSE_DOWN',
28391  MOUSE_UP: 'MOUSE_UP',
28392  MOUSE_OVER: 'MOUSE_OVER',
28393  MOUSE_OUT: 'MOUSE_OUT',
28394  MOUSE_MOVE: 'MOUSE_MOVE',
28395  MOUSE_MOVE_IN_VIEWPORT: 'MOUSE_MOVE_IN_VIEWPORT',
28396  SCROLL_INTO_VIEW: 'SCROLL_INTO_VIEW',
28397  SCROLL_OUT_OF_VIEW: 'SCROLL_OUT_OF_VIEW',
28398  SCROLLING_IN_VIEW: 'SCROLLING_IN_VIEW',
28399  ECOMMERCE_CART_OPEN: 'ECOMMERCE_CART_OPEN',
28400  ECOMMERCE_CART_CLOSE: 'ECOMMERCE_CART_CLOSE',
28401  PAGE_START: 'PAGE_START',
28402  PAGE_FINISH: 'PAGE_FINISH',
28403  PAGE_SCROLL_UP: 'PAGE_SCROLL_UP',
28404  PAGE_SCROLL_DOWN: 'PAGE_SCROLL_DOWN',
28405  PAGE_SCROLL: 'PAGE_SCROLL'
28406};
28407/**
28408 * Event Config Enums
28409 */
28410
28411exports.EventTypeConsts = EventTypeConsts;
28412var EventAppliesTo = {
28413  ELEMENT: 'ELEMENT',
28414  CLASS: 'CLASS',
28415  PAGE: 'PAGE'
28416};
28417exports.EventAppliesTo = EventAppliesTo;
28418var EventBasedOn = {
28419  ELEMENT: 'ELEMENT',
28420  VIEWPORT: 'VIEWPORT'
28421};
28422exports.EventBasedOn = EventBasedOn;
28423var EventContinuousMouseAxes = {
28424  X_AXIS: 'X_AXIS',
28425  Y_AXIS: 'Y_AXIS'
28426};
28427exports.EventContinuousMouseAxes = EventContinuousMouseAxes;
28428var EventLimitAffectedElements = {
28429  CHILDREN: 'CHILDREN',
28430  SIBLINGS: 'SIBLINGS',
28431  IMMEDIATE_CHILDREN: 'IMMEDIATE_CHILDREN'
28432};
28433/**
28434 * Quick Effect Enums
28435 */
28436
28437exports.EventLimitAffectedElements = EventLimitAffectedElements;
28438var QuickEffectIds = {
28439  FADE_EFFECT: 'FADE_EFFECT',
28440  SLIDE_EFFECT: 'SLIDE_EFFECT',
28441  GROW_EFFECT: 'GROW_EFFECT',
28442  SHRINK_EFFECT: 'SHRINK_EFFECT',
28443  SPIN_EFFECT: 'SPIN_EFFECT',
28444  FLY_EFFECT: 'FLY_EFFECT',
28445  POP_EFFECT: 'POP_EFFECT',
28446  FLIP_EFFECT: 'FLIP_EFFECT',
28447  JIGGLE_EFFECT: 'JIGGLE_EFFECT',
28448  PULSE_EFFECT: 'PULSE_EFFECT',
28449  DROP_EFFECT: 'DROP_EFFECT',
28450  BLINK_EFFECT: 'BLINK_EFFECT',
28451  BOUNCE_EFFECT: 'BOUNCE_EFFECT',
28452  FLIP_LEFT_TO_RIGHT_EFFECT: 'FLIP_LEFT_TO_RIGHT_EFFECT',
28453  FLIP_RIGHT_TO_LEFT_EFFECT: 'FLIP_RIGHT_TO_LEFT_EFFECT',
28454  RUBBER_BAND_EFFECT: 'RUBBER_BAND_EFFECT',
28455  JELLO_EFFECT: 'JELLO_EFFECT',
28456  GROW_BIG_EFFECT: 'GROW_BIG_EFFECT',
28457  SHRINK_BIG_EFFECT: 'SHRINK_BIG_EFFECT',
28458  PLUGIN_LOTTIE_EFFECT: 'PLUGIN_LOTTIE_EFFECT'
28459};
28460/**
28461 * Quick Effect Direction Enums
28462 */
28463
28464exports.QuickEffectIds = QuickEffectIds;
28465var QuickEffectDirectionConsts = {
28466  LEFT: 'LEFT',
28467  RIGHT: 'RIGHT',
28468  BOTTOM: 'BOTTOM',
28469  TOP: 'TOP',
28470  BOTTOM_LEFT: 'BOTTOM_LEFT',
28471  BOTTOM_RIGHT: 'BOTTOM_RIGHT',
28472  TOP_RIGHT: 'TOP_RIGHT',
28473  TOP_LEFT: 'TOP_LEFT',
28474  CLOCKWISE: 'CLOCKWISE',
28475  COUNTER_CLOCKWISE: 'COUNTER_CLOCKWISE'
28476};
28477exports.QuickEffectDirectionConsts = QuickEffectDirectionConsts;
28478
28479/***/ }),
28480/* 307 */
28481/***/ (function(module, exports, __webpack_require__) {
28482
28483"use strict";
28484
28485
28486Object.defineProperty(exports, "__esModule", {
28487  value: true
28488});
28489exports.ActionAppliesTo = exports.ActionTypeConsts = void 0;
28490var ActionTypeConsts = {
28491  TRANSFORM_MOVE: 'TRANSFORM_MOVE',
28492  TRANSFORM_SCALE: 'TRANSFORM_SCALE',
28493  TRANSFORM_ROTATE: 'TRANSFORM_ROTATE',
28494  TRANSFORM_SKEW: 'TRANSFORM_SKEW',
28495  STYLE_OPACITY: 'STYLE_OPACITY',
28496  STYLE_SIZE: 'STYLE_SIZE',
28497  STYLE_FILTER: 'STYLE_FILTER',
28498  STYLE_BACKGROUND_COLOR: 'STYLE_BACKGROUND_COLOR',
28499  STYLE_BORDER: 'STYLE_BORDER',
28500  STYLE_TEXT_COLOR: 'STYLE_TEXT_COLOR',
28501  PLUGIN_LOTTIE: 'PLUGIN_LOTTIE',
28502  GENERAL_DISPLAY: 'GENERAL_DISPLAY',
28503  GENERAL_START_ACTION: 'GENERAL_START_ACTION',
28504  GENERAL_CONTINUOUS_ACTION: 'GENERAL_CONTINUOUS_ACTION',
28505  // TODO: Clean these up below because they're not used at this time
28506  GENERAL_COMBO_CLASS: 'GENERAL_COMBO_CLASS',
28507  GENERAL_STOP_ACTION: 'GENERAL_STOP_ACTION',
28508  GENERAL_LOOP: 'GENERAL_LOOP',
28509  STYLE_BOX_SHADOW: 'STYLE_BOX_SHADOW'
28510};
28511exports.ActionTypeConsts = ActionTypeConsts;
28512var ActionAppliesTo = {
28513  ELEMENT: 'ELEMENT',
28514  ELEMENT_CLASS: 'ELEMENT_CLASS',
28515  TRIGGER_ELEMENT: 'TRIGGER_ELEMENT'
28516};
28517exports.ActionAppliesTo = ActionAppliesTo;
28518
28519/***/ }),
28520/* 308 */
28521/***/ (function(module, exports, __webpack_require__) {
28522
28523"use strict";
28524
28525
28526Object.defineProperty(exports, "__esModule", {
28527  value: true
28528});
28529exports.InteractionTypeConsts = void 0;
28530var InteractionTypeConsts = {
28531  MOUSE_CLICK_INTERACTION: 'MOUSE_CLICK_INTERACTION',
28532  MOUSE_HOVER_INTERACTION: 'MOUSE_HOVER_INTERACTION',
28533  MOUSE_MOVE_INTERACTION: 'MOUSE_MOVE_INTERACTION',
28534  SCROLL_INTO_VIEW_INTERACTION: 'SCROLL_INTO_VIEW_INTERACTION',
28535  SCROLLING_IN_VIEW_INTERACTION: 'SCROLLING_IN_VIEW_INTERACTION',
28536  MOUSE_MOVE_IN_VIEWPORT_INTERACTION: 'MOUSE_MOVE_IN_VIEWPORT_INTERACTION',
28537  PAGE_IS_SCROLLING_INTERACTION: 'PAGE_IS_SCROLLING_INTERACTION',
28538  PAGE_LOAD_INTERACTION: 'PAGE_LOAD_INTERACTION',
28539  PAGE_SCROLLED_INTERACTION: 'PAGE_SCROLLED_INTERACTION',
28540  NAVBAR_INTERACTION: 'NAVBAR_INTERACTION',
28541  DROPDOWN_INTERACTION: 'DROPDOWN_INTERACTION',
28542  ECOMMERCE_CART_INTERACTION: 'ECOMMERCE_CART_INTERACTION',
28543  TAB_INTERACTION: 'TAB_INTERACTION',
28544  SLIDER_INTERACTION: 'SLIDER_INTERACTION'
28545};
28546exports.InteractionTypeConsts = InteractionTypeConsts;
28547
28548/***/ }),
28549/* 309 */
28550/***/ (function(module, exports, __webpack_require__) {
28551
28552"use strict";
28553
28554
28555Object.defineProperty(exports, "__esModule", {
28556  value: true
28557});
28558exports.IX2_TEST_FRAME_RENDERED = exports.IX2_MEDIA_QUERIES_DEFINED = exports.IX2_VIEWPORT_WIDTH_CHANGED = exports.IX2_ACTION_LIST_PLAYBACK_CHANGED = exports.IX2_ELEMENT_STATE_CHANGED = exports.IX2_INSTANCE_REMOVED = exports.IX2_INSTANCE_STARTED = exports.IX2_INSTANCE_ADDED = exports.IX2_PARAMETER_CHANGED = exports.IX2_ANIMATION_FRAME_CHANGED = exports.IX2_EVENT_STATE_CHANGED = exports.IX2_EVENT_LISTENER_ADDED = exports.IX2_CLEAR_REQUESTED = exports.IX2_STOP_REQUESTED = exports.IX2_PLAYBACK_REQUESTED = exports.IX2_PREVIEW_REQUESTED = exports.IX2_SESSION_STOPPED = exports.IX2_SESSION_STARTED = exports.IX2_SESSION_INITIALIZED = exports.IX2_RAW_DATA_IMPORTED = void 0;
28559var IX2_RAW_DATA_IMPORTED = 'IX2_RAW_DATA_IMPORTED';
28560exports.IX2_RAW_DATA_IMPORTED = IX2_RAW_DATA_IMPORTED;
28561var IX2_SESSION_INITIALIZED = 'IX2_SESSION_INITIALIZED';
28562exports.IX2_SESSION_INITIALIZED = IX2_SESSION_INITIALIZED;
28563var IX2_SESSION_STARTED = 'IX2_SESSION_STARTED';
28564exports.IX2_SESSION_STARTED = IX2_SESSION_STARTED;
28565var IX2_SESSION_STOPPED = 'IX2_SESSION_STOPPED';
28566exports.IX2_SESSION_STOPPED = IX2_SESSION_STOPPED;
28567var IX2_PREVIEW_REQUESTED = 'IX2_PREVIEW_REQUESTED';
28568exports.IX2_PREVIEW_REQUESTED = IX2_PREVIEW_REQUESTED;
28569var IX2_PLAYBACK_REQUESTED = 'IX2_PLAYBACK_REQUESTED';
28570exports.IX2_PLAYBACK_REQUESTED = IX2_PLAYBACK_REQUESTED;
28571var IX2_STOP_REQUESTED = 'IX2_STOP_REQUESTED';
28572exports.IX2_STOP_REQUESTED = IX2_STOP_REQUESTED;
28573var IX2_CLEAR_REQUESTED = 'IX2_CLEAR_REQUESTED';
28574exports.IX2_CLEAR_REQUESTED = IX2_CLEAR_REQUESTED;
28575var IX2_EVENT_LISTENER_ADDED = 'IX2_EVENT_LISTENER_ADDED';
28576exports.IX2_EVENT_LISTENER_ADDED = IX2_EVENT_LISTENER_ADDED;
28577var IX2_EVENT_STATE_CHANGED = 'IX2_EVENT_STATE_CHANGED';
28578exports.IX2_EVENT_STATE_CHANGED = IX2_EVENT_STATE_CHANGED;
28579var IX2_ANIMATION_FRAME_CHANGED = 'IX2_ANIMATION_FRAME_CHANGED';
28580exports.IX2_ANIMATION_FRAME_CHANGED = IX2_ANIMATION_FRAME_CHANGED;
28581var IX2_PARAMETER_CHANGED = 'IX2_PARAMETER_CHANGED';
28582exports.IX2_PARAMETER_CHANGED = IX2_PARAMETER_CHANGED;
28583var IX2_INSTANCE_ADDED = 'IX2_INSTANCE_ADDED';
28584exports.IX2_INSTANCE_ADDED = IX2_INSTANCE_ADDED;
28585var IX2_INSTANCE_STARTED = 'IX2_INSTANCE_STARTED';
28586exports.IX2_INSTANCE_STARTED = IX2_INSTANCE_STARTED;
28587var IX2_INSTANCE_REMOVED = 'IX2_INSTANCE_REMOVED';
28588exports.IX2_INSTANCE_REMOVED = IX2_INSTANCE_REMOVED;
28589var IX2_ELEMENT_STATE_CHANGED = 'IX2_ELEMENT_STATE_CHANGED';
28590exports.IX2_ELEMENT_STATE_CHANGED = IX2_ELEMENT_STATE_CHANGED;
28591var IX2_ACTION_LIST_PLAYBACK_CHANGED = 'IX2_ACTION_LIST_PLAYBACK_CHANGED';
28592exports.IX2_ACTION_LIST_PLAYBACK_CHANGED = IX2_ACTION_LIST_PLAYBACK_CHANGED;
28593var IX2_VIEWPORT_WIDTH_CHANGED = 'IX2_VIEWPORT_WIDTH_CHANGED';
28594exports.IX2_VIEWPORT_WIDTH_CHANGED = IX2_VIEWPORT_WIDTH_CHANGED;
28595var IX2_MEDIA_QUERIES_DEFINED = 'IX2_MEDIA_QUERIES_DEFINED';
28596exports.IX2_MEDIA_QUERIES_DEFINED = IX2_MEDIA_QUERIES_DEFINED;
28597var IX2_TEST_FRAME_RENDERED = 'IX2_TEST_FRAME_RENDERED';
28598exports.IX2_TEST_FRAME_RENDERED = IX2_TEST_FRAME_RENDERED;
28599
28600/***/ }),
28601/* 310 */
28602/***/ (function(module, exports, __webpack_require__) {
28603
28604"use strict";
28605
28606
28607Object.defineProperty(exports, "__esModule", {
28608  value: true
28609});
28610exports.RENDER_PLUGIN = exports.RENDER_STYLE = exports.RENDER_GENERAL = exports.RENDER_TRANSFORM = exp
28610orts.ABSTRACT_NODE = exports.PLAIN_OBJECT = exports.HTML_ELEMENT = exports.PRESERVE_3D = exports.PARENT = exports.SIBLINGS = exports.IMMEDIATE_CHILDREN = exports.CHILDREN = exports.BAR_DELIMITER = exports.COLON_DELIMITER = exports.COMMA_DELIMITER = exports.AUTO = exports.WILL_CHANGE = exports.FLEX = exports.DISPLAY = exports.COLOR = exports.BORDER_COLOR = exports.BACKGROUND = exports.BACKGROUND_COLOR = exports.HEIGHT = exports.WIDTH = exports.FILTER = exports.OPACITY = exports.SKEW_Y = exports.SKEW_X = exports.SKEW = exports.ROTATE_Z = exports.ROTATE_Y = exports.ROTATE_X = exports.SCALE_3D = exports.SCALE_Z = exports.SCALE_Y = exports.SCALE_X = exports.TRANSLATE_3D = exports.TRANSLATE_Z = exports.TRANSLATE_Y = exports.TRANSLATE_X = exports.TRANSFORM = exports.CONFIG_UNIT = exports.CONFIG_Z_UNIT = exports.CONFIG_Y_UNIT = exports.CONFIG_X_UNIT = exports.CONFIG_VALUE = exports.CONFIG_Z_VALUE = exports.CONFIG_Y_VALUE = exports.CONFIG_X_VALUE = exports.BOUNDARY_SELECTOR = exports.W_MOD_IX = exports.W_MOD_JS = exports.WF_PAGE = exports.IX2_ID_DELIMITER = void 0;
28611var IX2_ID_DELIMITER = '|';
28612exports.IX2_ID_DELIMITER = IX2_ID_DELIMITER;
28613var WF_PAGE = 'data-wf-page';
28614exports.WF_PAGE = WF_PAGE;
28615var W_MOD_JS = 'w-mod-js';
28616exports.W_MOD_JS = W_MOD_JS;
28617var W_MOD_IX = 'w-mod-ix';
28618exports.W_MOD_IX = W_MOD_IX;
28619var BOUNDARY_SELECTOR = '.w-dyn-item';
28620exports.BOUNDARY_SELECTOR = BOUNDARY_SELECTOR;
28621var CONFIG_X_VALUE = 'xValue';
28622exports.CONFIG_X_VALUE = CONFIG_X_VALUE;
28623var CONFIG_Y_VALUE = 'yValue';
28624exports.CONFIG_Y_VALUE = CONFIG_Y_VALUE;
28625var CONFIG_Z_VALUE = 'zValue';
28626exports.CONFIG_Z_VALUE = CONFIG_Z_VALUE;
28627var CONFIG_VALUE = 'value';
28628exports.CONFIG_VALUE = CONFIG_VALUE;
28629var CONFIG_X_UNIT = 'xUnit';
28630exports.CONFIG_X_UNIT = CONFIG_X_UNIT;
28631var CONFIG_Y_UNIT = 'yUnit';
28632exports.CONFIG_Y_UNIT = CONFIG_Y_UNIT;
28633var CONFIG_Z_UNIT = 'zUnit';
28634exports.CONFIG_Z_UNIT = CONFIG_Z_UNIT;
28635var CONFIG_UNIT = 'unit';
28636exports.CONFIG_UNIT = CONFIG_UNIT;
28637var TRANSFORM = 'transform';
28638exports.TRANSFORM = TRANSFORM;
28639var TRANSLATE_X = 'translateX';
28640exports.TRANSLATE_X = TRANSLATE_X;
28641var TRANSLATE_Y = 'translateY';
28642exports.TRANSLATE_Y = TRANSLATE_Y;
28643var TRANSLATE_Z = 'translateZ';
28644exports.TRANSLATE_Z = TRANSLATE_Z;
28645var TRANSLATE_3D = 'translate3d';
28646exports.TRANSLATE_3D = TRANSLATE_3D;
28647var SCALE_X = 'scaleX';
28648exports.SCALE_X = SCALE_X;
28649var SCALE_Y = 'scaleY';
28650exports.SCALE_Y = SCALE_Y;
28651var SCALE_Z = 'scaleZ';
28652exports.SCALE_Z = SCALE_Z;
28653var SCALE_3D = 'scale3d';
28654exports.SCALE_3D = SCALE_3D;
28655var ROTATE_X = 'rotateX';
28656exports.ROTATE_X = ROTATE_X;
28657var ROTATE_Y = 'rotateY';
28658exports.ROTATE_Y = ROTATE_Y;
28659var ROTATE_Z = 'rotateZ';
28660exports.ROTATE_Z = ROTATE_Z;
28661var SKEW = 'skew';
28662exports.SKEW = SKEW;
28663var SKEW_X = 'skewX';
28664exports.SKEW_X = SKEW_X;
28665var SKEW_Y = 'skewY';
28666exports.SKEW_Y = SKEW_Y;
28667var OPACITY = 'opacity';
28668exports.OPACITY = OPACITY;
28669var FILTER = 'filter';
28670exports.FILTER = FILTER;
28671var WIDTH = 'width';
28672exports.WIDTH = WIDTH;
28673var HEIGHT = 'height';
28674exports.HEIGHT = HEIGHT;
28675var BACKGROUND_COLOR = 'backgroundColor';
28676exports.BACKGROUND_COLOR = BACKGROUND_COLOR;
28677var BACKGROUND = 'background';
28678exports.BACKGROUND = BACKGROUND;
28679var BORDER_COLOR = 'borderColor';
28680exports.BORDER_COLOR = BORDER_COLOR;
28681var COLOR = 'color';
28682exports.COLOR = COLOR;
28683var DISPLAY = 'display';
28684exports.DISPLAY = DISPLAY;
28685var FLEX = 'flex';
28686exports.FLEX = FLEX;
28687var WILL_CHANGE = 'willChange';
28688exports.WILL_CHANGE = WILL_CHANGE;
28689var AUTO = 'AUTO';
28690exports.AUTO = AUTO;
28691var COMMA_DELIMITER = ',';
28692exports.COMMA_DELIMITER = COMMA_DELIMITER;
28693var COLON_DELIMITER = ':';
28694exports.COLON_DELIMITER = COLON_DELIMITER;
28695var BAR_DELIMITER = '|';
28696exports.BAR_DELIMITER = BAR_DELIMITER;
28697var CHILDREN = 'CHILDREN';
28698exports.CHILDREN = CHILDREN;
28699var IMMEDIATE_CHILDREN = 'IMMEDIATE_CHILDREN';
28700exports.IMMEDIATE_CHILDREN = IMMEDIATE_CHILDREN;
28701var SIBLINGS = 'SIBLINGS';
28702exports.SIBLINGS = SIBLINGS;
28703var PARENT = 'PARENT';
28704exports.PARENT = PARENT;
28705var PRESERVE_3D = 'preserve-3d';
28706exports.PRESERVE_3D = PRESERVE_3D;
28707var HTML_ELEMENT = 'HTML_ELEMENT';
28708exports.HTML_ELEMENT = HTML_ELEMENT;
28709var PLAIN_OBJECT = 'PLAIN_OBJECT';
28710exports.PLAIN_OBJECT = PLAIN_OBJECT;
28711var ABSTRACT_NODE = 'ABSTRACT_NODE';
28712exports.ABSTRACT_NODE = ABSTRACT_NODE;
28713var RENDER_TRANSFORM = 'RENDER_TRANSFORM';
28714exports.RENDER_TRANSFORM = RENDER_TRANSFORM;
28715var RENDER_GENERAL = 'RENDER_GENERAL';
28716exports.RENDER_GENERAL = RENDER_GENERAL;
28717var RENDER_STYLE = 'RENDER_STYLE';
28718exports.RENDER_STYLE = RENDER_STYLE;
28719var RENDER_PLUGIN = 'RENDER_PLUGIN';
28720exports.RENDER_PLUGIN = RENDER_PLUGIN;
28721
28722/***/ }),
28723/* 311 */
28724/***/ (function(module, exports, __webpack_require__) {
28725
28726"use strict";
28727
28728
28729var _interopRequireDefault2 = __webpack_require__(1);
28730
28731var _defineProperty2 = _interopRequireDefault2(__webpack_require__(31));
28732
28733var _Object$create;
28734
28735var _interopRequireDefault = __webpack_require__(1);
28736
28737Object.defineProperty(exports, "__esModule", {
28738  value: true
28739});
28740exports.ixRequest = void 0;
28741
28742var _extends2 = _interopRequireDefault(__webpack_require__(30));
28743
28744var _constants = __webpack_require__(6);
28745
28746var _timm = __webpack_require__(40);
28747
28748var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
28749    IX2_PREVIEW_REQUESTED = _constants$IX2EngineA.IX2_PREVIEW_REQUESTED,
28750    IX2_PLAYBACK_REQUESTED = _constants$IX2EngineA.IX2_PLAYBACK_REQUESTED,
28751    IX2_STOP_REQUESTED = _constants$IX2EngineA.IX2_STOP_REQUESTED,
28752    IX2_CLEAR_REQUESTED = _constants$IX2EngineA.IX2_CLEAR_REQUESTED;
28753var initialState = {
28754  preview: {},
28755  playback: {},
28756  stop: {},
28757  clear: {}
28758};
28759var stateKeys = Object.create(null, (_Object$create = {}, (0, _defineProperty2["default"])(_Object$create, IX2_PREVIEW_REQUESTED, {
28760  value: 'preview'
28761}), (0, _defineProperty2["default"])(_Object$create, IX2_PLAYBACK_REQUESTED, {
28762  value: 'playback'
28763}), (0, _defineProperty2["default"])(_Object$create, IX2_STOP_REQUESTED, {
28764  value: 'stop'
28765}), (0, _defineProperty2["default"])(_Object$create, IX2_CLEAR_REQUESTED, {
28766  value: 'clear'
28767}), _Object$create));
28768
28769var ixRequest = function ixRequest() {
28770  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
28771  var action = arguments.length > 1 ? arguments[1] : undefined;
28772
28773  if (action.type in stateKeys) {
28774    var key = [stateKeys[action.type]];
28775    return (0, _timm.setIn)(state, [key], (0, _extends2["default"])({}, action.payload));
28776  }
28777
28778  return state;
28779};
28780
28781exports.ixRequest = ixRequest;
28782
28783/***/ }),
28784/* 312 */
28785/***/ (function(module, exports, __webpack_require__) {
28786
28787"use strict";
28788
28789
28790Object.defineProperty(exports, "__esModule", {
28791  value: true
28792});
28793exports.ixSession = void 0;
28794
28795var _constants = __webpack_require__(6);
28796
28797var _timm = __webpack_require__(40);
28798
28799var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
28800    IX2_SESSION_INITIALIZED = _constants$IX2EngineA.IX2_SESSION_INITIALIZED,
28801    IX2_SESSION_STARTED = _constants$IX2EngineA.IX2_SESSION_STARTED,
28802    IX2_TEST_FRAME_RENDERED = _constants$IX2EngineA.IX2_TEST_FRAME_RENDERED,
28803    IX2_SESSION_STOPPED = _constants$IX2EngineA.IX2_SESSION_STOPPED,
28804    IX2_EVENT_LISTENER_ADDED = _constants$IX2EngineA.IX2_EVENT_LISTENER_ADDED,
28805    IX2_EVENT_STATE_CHANGED = _constants$IX2EngineA.IX2_EVENT_STATE_CHANGED,
28806    IX2_ANIMATION_FRAME_CHANGED = _constants$IX2EngineA.IX2_ANIMATION_FRAME_CHANGED,
28807    IX2_ACTION_LIST_PLAYBACK_CHANGED = _constants$IX2EngineA.IX2_ACTION_LIST_PLAYBACK_CHANGED,
28808    IX2_VIEWPORT_WIDTH_CHANGED = _constants$IX2EngineA.IX2_VIEWPORT_WIDTH_CHANGED,
28809    IX2_MEDIA_QUERIES_DEFINED = _constants$IX2EngineA.IX2_MEDIA_QUERIES_DEFINED;
28810var initialState = {
28811  active: false,
28812  tick: 0,
28813  eventListeners: [],
28814  eventState: {},
28815  playbackState: {},
28816  viewportWidth: 0,
28817  mediaQueryKey: null,
28818  hasBoundaryNodes: false,
28819  hasDefinedMediaQueries: false
28820};
28821var TEST_FRAME_STEPS_SIZE = 20; // $FlowFixMe
28822
28823var ixSession = function ixSession() {
28824  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
28825  var action = arguments.length > 1 ? arguments[1] : undefined;
28826
28827  switch (action.type) {
28828    case IX2_SESSION_INITIALIZED:
28829      {
28830        var hasBoundaryNodes = action.payload.hasBoundaryNodes;
28831        return (0, _timm.set)(state, 'hasBoundaryNodes', hasBoundaryNodes);
28832      }
28833
28834    case IX2_SESSION_STARTED:
28835      {
28836        return (0, _timm.set)(state, 'active', true);
28837      }
28838
28839    case IX2_TEST_FRAME_RENDERED:
28840      {
28841        var _action$payload$step = action.payload.step,
28842            step = _action$payload$step === void 0 ? TEST_FRAME_STEPS_SIZE : _action$payload$step;
28843        return (0, _timm.set)(state, 'tick', state.tick + step);
28844      }
28845
28846    case IX2_SESSION_STOPPED:
28847      {
28848        return initialState;
28849      }
28850
28851    case IX2_ANIMATION_FRAME_CHANGED:
28852      {
28853        var now = action.payload.now;
28854        return (0, _timm.set)(state, 'tick', now);
28855      }
28856
28857    case IX2_EVENT_LISTENER_ADDED:
28858      {
28859        var eventListeners = (0, _timm.addLast)(state.eventListeners, action.payload);
28860        return (0, _timm.set)(state, 'eventListeners', eventListeners);
28861      }
28862
28863    case IX2_EVENT_STATE_CHANGED:
28864      {
28865        var _action$payload = action.payload,
28866            stateKey = _action$payload.stateKey,
28867            newState = _action$payload.newState;
28868        return (0, _timm.setIn)(state, ['eventState', stateKey], newState);
28869      }
28870
28871    case IX2_ACTION_LIST_PLAYBACK_CHANGED:
28872      {
28873        var _action$payload2 = action.payload,
28874            actionListId = _action$payload2.actionListId,
28875            isPlaying = _action$payload2.isPlaying;
28876        return (0, _timm.setIn)(state, ['playbackState', actionListId], isPlaying);
28877      }
28878
28879    case IX2_VIEWPORT_WIDTH_CHANGED:
28880      {
28881        var _action$payload3 = action.payload,
28882            width = _action$payload3.width,
28883            mediaQueries = _action$payload3.mediaQueries;
28884        var mediaQueryCount = mediaQueries.length;
28885        var mediaQueryKey = null;
28886
28887        for (var i = 0; i < mediaQueryCount; i++) {
28888          var _mediaQueries$i = mediaQueries[i],
28889              key = _mediaQueries$i.key,
28890              min = _mediaQueries$i.min,
28891              max = _mediaQueries$i.max;
28892
28893          if (width >= min && width <= max) {
28894            mediaQueryKey = key;
28895            break;
28896          }
28897        }
28898
28899        return (0, _timm.merge)(state, {
28900          viewportWidth: width,
28901          mediaQueryKey: mediaQueryKey
28902        });
28903      }
28904
28905    case IX2_MEDIA_QUERIES_DEFINED:
28906      {
28907        return (0, _timm.set)(state, 'hasDefinedMediaQueries', true);
28908      }
28909
28910    default:
28911      {
28912        return state;
28913      }
28914  }
28915};
28916
28917exports.ixSession = ixSession;
28918
28919/***/ }),
28920/* 313 */
28921/***/ (function(module, exports) {
28922
28923function _arrayWithoutHoles(arr) {
28924  if (Array.isArray(arr)) {
28925    for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
28926      arr2[i] = arr[i];
28927    }
28928
28929    return arr2;
28930  }
28931}
28932
28933module.exports = _arrayWithoutHoles;
28934
28935/***/ }),
28936/* 314 */
28937/***/ (function(module, exports) {
28938
28939function _iterableToArray(iter) {
28940  if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
28941}
28942
28943module.exports = _iterableToArray;
28944
28945/***/ }),
28946/* 315 */
28947/***/ (function(module, exports) {
28948
28949function _nonIterableSpread() {
28950  throw new TypeError("Invalid attempt to spread non-iterable instance");
28951}
28952
28953module.exports = _nonIterableSpread;
28954
28955/***/ }),
28956/* 316 */
28957/***/ (function(module, exports, __webpack_require__) {
28958
28959"use strict";
28960
28961
28962Object.defineProperty(exports, "__esModule", {
28963  value: true
28964});
28965exports.createElementState = createElementState;
28966exports.mergeActionState = mergeActionState;
28967exports.ixElements = void 0;
28968
28969var _timm = __webpack_require__(40);
28970
28971var _constants = __webpack_require__(6);
28972
28973var _constants$IX2EngineC = _constants.IX2EngineConstants,
28974    HTML_ELEMENT = _constants$IX2EngineC.HTML_ELEMENT,
28975    PLAIN_OBJECT = _constants$IX2EngineC.PLAIN_OBJECT,
28976    ABSTRACT_NODE = _constants$IX2EngineC.ABSTRACT_NODE,
28977    CONFIG_X_VALUE = _constants$IX2EngineC.CONFIG_X_VALUE,
28978    CONFIG_Y_VALUE = _constants$IX2EngineC.CONFIG_Y_VALUE,
28979    CONFIG_Z_VALUE = _constants$IX2EngineC.CONFIG_Z_VALUE,
28980    CONFIG_VALUE = _constants$IX2EngineC.CONFIG_VALUE,
28981    CONFIG_X_UNIT = _constants$IX2EngineC.CONFIG_X_UNIT,
28982    CONFIG_Y_UNIT = _constants$IX2EngineC.CONFIG_Y_UNIT,
28983    CONFIG_Z_UNIT = _constants$IX2EngineC.CONFIG_Z_UNIT,
28984    CONFIG_UNIT = _constants$IX2EngineC.CONFIG_UNIT;
28985var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
28986    IX2_SESSION_STOPPED = _constants$IX2EngineA.IX2_SESSION_STOPPED,
28987    IX2_INSTANCE_ADDED = _constants$IX2EngineA.IX2_INSTANCE_ADDED,
28988    IX2_ELEMENT_STATE_CHANGED = _constants$IX2EngineA.IX2_ELEMENT_STATE_CHANGED;
28989var initialState = {};
28990var refState = 'refState';
28991
28992var ixElements = function ixElements() {
28993  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
28994  var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
28995
28996  switch (action.type) {
28997    case IX2_SESSION_STOPPED:
28998      {
28999        return initialState;
29000      }
29001
29002    case IX2_INSTANCE_ADDED:
29003      {
29004        var _action$payload = action.payload,
29005            elementId = _action$payload.elementId,
29006            ref = _action$payload.element,
29007            origin = _action$payload.origin,
29008            actionItem = _action$payload.actionItem,
29009            refType = _action$payload.refType;
29010        var actionTypeId = actionItem.actionTypeId;
29011        var newState = state; // Create new ref entry if it doesn't exist
29012
29013        if ((0, _timm.getIn)(newState, [elementId, ref]) !== ref) {
29014          newState = createElementState(newState, ref, refType, elementId, actionItem);
29015        } // Merge origin values into ref state
29016
29017
29018        return mergeActionState(newState, elementId, actionTypeId, origin, actionItem);
29019      }
29020
29021    case IX2_ELEMENT_STATE_CHANGED:
29022      {
29023        var _action$payload2 = action.payload,
29024            _elementId = _action$payload2.elementId,
29025            _actionTypeId = _action$payload2.actionTypeId,
29026            current = _action$payload2.current,
29027            _actionItem = _action$payload2.actionItem;
29028        return mergeActionState(state, _elementId, _actionTypeId, current, _actionItem);
29029      }
29030
29031    default:
29032      {
29033        return state;
29034      }
29035  }
29036};
29037
29038exports.ixElements = ixElements;
29039
29040function createElementState(state, ref, refType, elementId, actionItem) {
29041  var refId = refType === PLAIN_OBJECT ? (0, _timm.getIn)(actionItem, ['config', 'target', 'objectId']) : null;
29042  return (0, _timm.mergeIn)(state, [elementId], {
29043    id: elementId,
29044    ref: ref,
29045    refId: refId,
29046    refType: refType
29047  });
29048}
29049
29050function mergeActionState(state, elementId, actionTypeId, actionState, // FIXME: weak type is used
29051actionItem) {
29052  var units = pickUnits(actionItem);
29053  var mergePath = [elementId, refState, actionTypeId];
29054  return (0, _timm.mergeIn)(state, mergePath, actionState, units);
29055}
29056
29057var valueUnitPairs = [[CONFIG_X_VALUE, CONFIG_X_UNIT], [CONFIG_Y_VALUE, CONFIG_Y_UNIT], [CONFIG_Z_VALUE, CONFIG_Z_UNIT], [CONFIG_VALUE, CONFIG_UNIT]]; // FIXME: weak type is used
29058// eslint-disable-next-line flowtype/no-weak-types
29059
29060function pickUnits(actionItem) {
29061  var config = actionItem.config;
29062  return valueUnitPairs.reduce(function (result, pair) {
29063    var valueKey = pair[0];
29064    var unitKey = pair[1];
29065    var configValue = config[valueKey];
29066    var configUnit = config[unitKey];
29067
29068    if (configValue != null && configUnit != null) {
29069      result[unitKey] = configUnit;
29070    }
29071
29072    return result;
29073  }, {});
29074}
29075
29076/***/ }),
29077/* 317 */
29078/***/ (function(module, exports, __webpack_require__) {
29079
29080"use strict";
29081
29082
29083Object.defineProperty(exports, "__esModule", {
29084  value: true
29085});
29086exports.clearPlugin = exports.renderPlugin = exports.createPluginInstance = exports.getPluginDestination = exports.getPluginOrigin = exports.getPluginDuration = exports.getPluginConfig = void 0;
29087/* eslint-env browser */
29088// $FlowFixMe
29089
29090var getPluginConfig = function getPluginConfig(actionItemConfig) {
29091  return actionItemConfig.value;
29092}; // $FlowFixMe
29093
29094
29095exports.getPluginConfig = getPluginConfig;
29096
29097var getPluginDuration = function getPluginDuration(element, actionItem) {
29098  if (actionItem.config.duration !== 'auto') {
29099    return null;
29100  }
29101
29102  var duration = parseFloat(element.getAttribute('data-duration'));
29103
29104  if (duration > 0) {
29105    return duration * 1000;
29106  }
29107
29108  return parseFloat(element.getAttribute('data-default-duration')) * 1000;
29109}; // $FlowFixMe
29110
29111
29112exports.getPluginDuration = getPluginDuration;
29113
29114var getPluginOrigin = function getPluginOrigin(refState) {
29115  return refState || {
29116    value: 0
29117  };
29118}; // $FlowFixMe
29119
29120
29121exports.getPluginOrigin = getPluginOrigin;
29122
29123var getPluginDestination = function getPluginDestination(actionItemConfig) {
29124  return {
29125    value: actionItemConfig.value
29126  };
29127}; // $FlowFixMe
29128
29129
29130exports.getPluginDestination = getPluginDestination;
29131
29132var createPluginInstance = function createPluginInstance(element) {
29133  var instance = window.Webflow.require('lottie').createInstance(element);
29134
29135  instance.stop();
29136  instance.setSubframe(true);
29137  return instance;
29138}; // $FlowFixMe
29139
29140
29141exports.createPluginInstance = createPluginInstance;
29142
29143var renderPlugin = function renderPlugin(pluginInstance, refState, actionItem) {
29144  if (!pluginInstance) {
29145    return;
29146  }
29147
29148  var percent = refState[actionItem.actionTypeId].value / 100;
29149  pluginInstance.goToFrame(pluginInstance.frames * percent);
29150}; // $FlowFixMe
29151
29152
29153exports.renderPlugin = renderPlugin;
29154
29155var clearPlugin = function clearPlugin(element) {
29156  var instance = window.Webflow.require('lottie').createInstance(element);
29157
29158  instance.stop();
29159};
29160
29161exports.clearPlugin = clearPlugin;
29162
29163/***/ }),
29164/* 318 */
29165/***/ (function(module, exports, __webpack_require__) {
29166
29167"use strict";
29168
29169
29170var _interopRequireDefault2 = __webpack_require__(1);
29171
29172var _typeof2 = _interopRequireDefault2(__webpack_require__(41));
29173
29174var _defineProperty2 = _interopRequireDefault2(__webpack_require__(31));
29175
29176var _Object$freeze, _Object$freeze2, _transformDefaults;
29177
29178var _interopRequireDefault = __webpack_require__(1);
29179
29180Object.defineProperty(exports, "__esModule", {
29181  value: true
29182});
29183exports.getInstanceId = getInstanceId;
29184exports.getElementId = getElementId;
29185exports.reifyState = reifyState;
29186exports.observeStore = observeStore;
29187exports.getAffectedElements = getAffectedElements;
29188exports.getComputedStyle = getComputedStyle;
29189exports.getInstanceOrigin = getInstanceOrigin;
29190exports.getDestinationValues = getDestinationValues;
29191exports.getRenderType = getRenderType;
29192exports.getStyleProp = getStyleProp;
29193exports.renderHTMLElement = renderHTMLElement;
29194exports.clearAllStyles = clearAllStyles;
29195exports.cleanupHTMLElement = cleanupHTMLElement;
29196exports.getMaxDurationItemIndex = getMaxDurationItemIndex;
29197exports.getActionListProgress = getActionListProgress;
29198exports.reduceListToGroup = reduceListToGroup;
29199exports.shouldNamespaceEventParameter = shouldNamespaceEventParameter;
29200exports.getNamespacedParameterId = getNamespacedParameterId;
29201exports.shouldAllowMediaQuery = shouldAllowMediaQuery;
29202exports.mediaQueriesEqual = mediaQueriesEqual;
29203exports.stringifyTarget = stringifyTarget;
29204exports.getItemConfigByKey = void 0;
29205
29206var _defaultTo = _interopRequireDefault(__webpack_require__(319));
29207
29208var _reduce = _interopRequireDefault(__webpack_require__(320));
29209
29210var _findLast = _interopRequireDefault(__webpack_require__(326));
29211
29212var _timm = __webpack_require__(40);
29213
29214var _shallowEqual = _interopRequireDefault(__webpack_require__(144));
29215
29216var _constants = __webpack_require__(6);
29217
29218var _IX2EasingUtils = __webpack_require__(139);
29219
29220var _IX2VanillaPlugins = __webpack_require__(141);
29221
29222var _IX2BrowserSupport = __webpack_require__(86);
29223/* eslint-env browser */
29224
29225
29226var _constants$IX2EngineC = _constants.IX2EngineConstants,
29227    BACKGROUND = _constants$IX2EngineC.BACKGROUND,
29228    TRANSFORM = _constants$IX2EngineC.TRANSFORM,
29229    TRANSLATE_3D = _constants$IX2EngineC.TRANSLATE_3D,
29230    SCALE_3D = _constants$IX2EngineC.SCALE_3D,
29231    ROTATE_X = _constants$IX2EngineC.ROTATE_X,
29232    ROTATE_Y = _constants$IX2EngineC.ROTATE_Y,
29233    ROTATE_Z = _constants$IX2EngineC.ROTATE_Z,
29234    SKEW = _constants$IX2EngineC.SKEW,
29235    PRESERVE_3D = _constants$IX2EngineC.PRESERVE_3D,
29236    FLEX = _constants$IX2EngineC.FLEX,
29237    OPACITY = _constants$IX2EngineC.OPACITY,
29238    FILTER = _constants$IX2EngineC.FILTER,
29239    WIDTH = _constants$IX2EngineC.WIDTH,
29240    HEIGHT = _constants$IX2EngineC.HEIGHT,
29241    BACKGROUND_COLOR = _constants$IX2EngineC.BACKGROUND_COLOR,
29242    BORDER_COLOR = _constants$IX2EngineC.BORDER_COLOR,
29243    COLOR = _constants$IX2EngineC.COLOR,
29244    CHILDREN = _constants$IX2EngineC.CHILDREN,
29245    IMMEDIATE_CHILDREN = _constants$IX2EngineC.IMMEDIATE_CHILDREN,
29246    SIBLINGS = _constants$IX2EngineC.SIBLINGS,
29247    PARENT = _constants$IX2EngineC.PARENT,
29248    DISPLAY = _constants$IX2EngineC.DISPLAY,
29249    WILL_CHANGE = _constants$IX2EngineC.WILL_CHANGE,
29250    AUTO = _constants$IX2EngineC.AUTO,
29251    COMMA_DELIMITER = _constants$IX2EngineC.COMMA_DELIMITER,
29252    COLON_DELIMITER = _constants$IX2EngineC.COLON_DELIMITER,
29253    BAR_DELIMITER = _constants$IX2EngineC.BAR_DELIMITER,
29254    RENDER_TRANSFORM = _constants$IX2EngineC.RENDER_TRANSFORM,
29255    RENDER_GENERAL = _constants$IX2EngineC.RENDER_GENERAL,
29256    RENDER_STYLE = _constants$IX2EngineC.RENDER_STYLE,
29257    RENDER_PLUGIN = _constants$IX2EngineC.RENDER_PLUGIN;
29258var _constants$ActionType = _constants.ActionTypeConsts,
29259    TRANSFORM_MOVE = _constants$ActionType.TRANSFORM_MOVE,
29260    TRANSFORM_SCALE = _constants$ActionType.TRANSFORM_SCALE,
29261    TRANSFORM_ROTATE = _constants$ActionType.TRANSFORM_ROTATE,
29262    TRANSFORM_SKEW = _constants$ActionType.TRANSFORM_SKEW,
29263    STYLE_OPACITY = _constants$ActionType.STYLE_OPACITY,
29264    STYLE_FILTER = _constants$ActionType.STYLE_FILTER,
29265    STYLE_SIZE = _constants$ActionType.STYLE_SIZE,
29266    STYLE_BACKGROUND_COLOR = _constants$ActionType.STYLE_BACKGROUND_COLOR,
29267    STYLE_BORDER = _constants$ActionType.STYLE_BORDER,
29268    STYLE_TEXT_COLOR = _constants$ActionType.STYLE_TEXT_COLOR,
29269    GENERAL_DISPLAY = _constants$ActionType.GENERAL_DISPLAY;
29270var OBJECT_VALUE = 'OBJECT_VALUE';
29271
29272var trim = function trim(v) {
29273  return v.trim();
29274};
29275
29276var colorStyleProps = Object.freeze((_Object$freeze = {}, (0, _defineProperty2["default"])(_Object$freeze, STYLE_BACKGROUND_COLOR, BACKGROUND_COLOR), (0, _defineProperty2["default"])(_Object$freeze, STYLE_BORDER, BORDER_COLOR), (0, _defineProperty2["default"])(_Object$freeze, STYLE_TEXT_COLOR, COLOR), _Object$freeze));
29277var willChangeProps = Object.freeze((_Object$freeze2 = {}, (0, _defineProperty2["default"])(_Object$freeze2, _IX2BrowserSupport.TRANSFORM_PREFIXED, TRANSFORM), (0, _defineProperty2["default"])(_Object$freeze2, BACKGROUND_COLOR, BACKGROUND), (0, _defineProperty2["default"])(_Object$freeze2, OPACITY, OPACITY), (0, _defineProperty2["default"])(_Object$freeze2, FILTER, FILTER), (0, _defineProperty2["default"])(_Object$freeze2, WIDTH, WIDTH), (0, _defineProperty2["default"])(_Object$freeze2, HEIGHT, HEIGHT), _Object$freeze2));
29278var objectCache = {};
29279var instanceCount = 1;
29280
29281function getInstanceId() {
29282  return 'i' + instanceCount++;
29283}
29284
29285var elementCount = 1; // $FlowFixMe
29286
29287function getElementId(ixElements, ref) {
29288  // TODO: optimize element lookup
29289  for (var key in ixElements) {
29290    var ixEl = ixElements[key];
29291
29292    if (ixEl && ixEl.ref === ref) {
29293      return ixEl.id;
29294    }
29295  }
29296
29297  return 'e' + elementCount++;
29298} // $FlowFixMe
29299
29300
29301function reifyState() {
29302  var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
29303      events = _ref2.events,
29304      actionLists = _ref2.actionLists,
29305      site = _ref2.site;
29306
29307  var eventTypeMap = (0, _reduce["default"])(events, function (result, event) {
29308    var eventTypeId = event.eventTypeId;
29309
29310    if (!result[eventTypeId]) {
29311      result[eventTypeId] = {};
29312    }
29313
29314    result[eventTypeId][event.id] = event;
29315    return result;
29316  }, {});
29317  var mediaQueries = site && site.mediaQueries;
29318  var mediaQueryKeys = [];
29319
29320  if (mediaQueries) {
29321    mediaQueryKeys = mediaQueries.map(function (mq) {
29322      return mq.key;
29323    });
29324  } else {
29325    mediaQueries = [];
29326    console.warn("IX2 missing mediaQueries in site data");
29327  }
29328
29329  return {
29330    ixData: {
29331      events: events,
29332      actionLists: actionLists,
29333      eventTypeMap: eventTypeMap,
29334      mediaQueries: mediaQueries,
29335      mediaQueryKeys: mediaQueryKeys
29336    }
29337  };
29338}
29339
29340var strictEqual = function strictEqual(a, b) {
29341  return a === b;
29342}; // $FlowFixMe
29343
29344
29345function observeStore(_ref3) {
29346  var store = _ref3.store,
29347      select = _ref3.select,
29348      onChange = _ref3.onChange,
29349      _ref3$comparator = _ref3.comparator,
29350      comparator = _ref3$comparator === void 0 ? strictEqual : _ref3$comparator;
29351  var getState = store.getState,
29352      subscribe = store.subscribe;
29353  var unsubscribe = subscribe(handleChange);
29354  var currentState = select(getState());
29355
29356  function handleChange() {
29357    var nextState = select(getState());
29358
29359    if (nextState == null) {
29360      unsubscribe();
29361      return;
29362    }
29363
29364    if (!comparator(nextState, currentState)) {
29365      currentState = nextState;
29366      onChange(currentState, store);
29367    }
29368  }
29369
29370  return unsubscribe;
29371}
29372
29373function normalizeTarget(target) {
29374  var type = (0, _typeof2["default"])(target);
29375
29376  if (type === 'string') {
29377    return {
29378      id: target
29379    };
29380  } else if (target != null && type === 'object') {
29381    var id = target.id,
29382        objectId = target.objectId,
29383        selector = target.selector,
29384        selectorGuids = target.selectorGuids,
29385        appliesTo = target.appliesTo,
29386        useEventTarget = target.useEventTarget;
29387    return {
29388      id: id,
29389      objectId: objectId,
29390      selector: selector,
29391      selectorGuids: selectorGuids,
29392      appliesTo: appliesTo,
29393      useEventTarget: useEventTarget
29394    };
29395  }
29396
29397  return {};
29398}
29399
29400function getAffectedElements(_ref4) {
29401  var config = _ref4.config,
29402      event = _ref4.event,
29403      eventTarget = _ref4.eventTarget,
29404      elementRoot = _ref4.elementRoot,
29405      elementApi = _ref4.elementApi;
29406
29407  var _ref, _event$action, _event$action$config;
29408
29409  if (!elementApi) {
29410    throw new Error('IX2 missing elementApi');
29411  }
29412
29413  var targets = config.targets;
29414
29415  if (Array.isArray(targets) && targets.length > 0) {
29416    return targets.reduce(function (accumulator, target) {
29417      return accumulator.concat(getAffectedElements({
29418        config: {
29419          target: target
29420        },
29421        event: event,
29422        eventTarget: eventTarget,
29423        elementRoot: elementRoot,
29424        elementApi: elementApi
29425      }));
29426    }, []);
29427  }
29428
29429  var getValidDocument = elementApi.getValidDocument,
29430      getQuerySelector = elementApi.getQuerySelector,
29431      queryDocument = elementApi.queryDocument,
29432      getChildElements = elementApi.getChildElements,
29433      getSiblingElements = elementApi.getSiblingElements,
29434      matchSelector = elementApi.matchSelector,
29435      elementContains = elementApi.elementContains,
29436      isSiblingNode = elementApi.isSiblingNode;
29437  var target = config.target;
29438
29439  if (!target) {
29440    return [];
29441  }
29442
29443  var _normalizeTarget = normalizeTarget(target),
29444      id = _normalizeTarget.id,
29445      objectId = _normalizeTarget.objectId,
29446      selector = _normalizeTarget.selector,
29447      selectorGuids = _normalizeTarget.selectorGuids,
29448      appliesTo = _normalizeTarget.appliesTo,
29449      useEventTarget = _normalizeTarget.useEventTarget;
29450
29451  if (objectId) {
29452    var ref = objectCache[objectId] || (objectCache[objectId] = {});
29453    return [ref];
29454  }
29455
29456  if (appliesTo === _constants.EventAppliesTo.PAGE) {
29457    var doc = getValidDocument(id);
29458    return doc ? [doc] : [];
29459  }
29460
29461  var overrides = (_ref = event === null || event === void 0 ? void 0 : (_event$action = event.action) === null || _event$action === void 0 ? void 0 : (_event$action$config = _event$action.config) === null || _event$action$config === void 0 ? void 0 : _event$action$config.affectedElements) !== null && _ref !== void 0 ? _ref : {};
29462  var override = overrides[id || selector] || {};
29463  var validOverride = Boolean(override.id || override.selector);
29464  var limitAffectedElements;
29465  var baseSelector;
29466  var finalSelector;
29467  var eventTargetSelector = event && getQuerySelector(normalizeTarget(event.target));
29468
29469  if (validOverride) {
29470    limitAffectedElements = override.limitAffectedElements;
29471    baseSelector = eventTargetSelector;
29472    finalSelector = getQuerySelector(override);
29473  } else {
29474    // pass in selectorGuids as well for server-side rendering.
29475    baseSelector = finalSelector = getQuerySelector({
29476      id: id,
29477      selector: selector,
29478      selectorGuids: selectorGuids
29479    });
29480  }
29481
29482  if (event && useEventTarget) {
29483    // eventTarget is not defined when this function is called in a clear request, so find
29484    // all target elements associated with the event data, and return affected elements.
29485    var eventTargets = eventTarget && (finalSelector || useEventTarget === true) ? [eventTarget] : queryDocument(eventTargetSelector);
29486
29487    if (finalSelector) {
29488      if (useEventTarget === PARENT) {
29489        return queryDocument(finalSelector).filter(function (parentElement) {
29490          return eventTargets.some(function (targetElement) {
29491            return elementContains(parentElement, targetElement);
29492          });
29493        });
29494      }
29495
29496      if (useEventTarget === CHILDREN) {
29497        return queryDocument(finalSelector).filter(function (childElement) {
29498          return eventTargets.some(function (targetElement) {
29499            return elementContains(targetElement, childElement);
29500          });
29501        });
29502      }
29503
29504      if (useEventTarget === SIBLINGS) {
29505        return queryDocument(finalSelector).filter(function (siblingElement) {
29506          return eventTargets.some(function (targetElement) {
29507            return isSiblingNode(targetElement, siblingElement);
29508          });
29509        });
29510      }
29511    }
29512
29513    return eventTargets;
29514  }
29515
29516  if (baseSelector == null || finalSelector == null) {
29517    return [];
29518  }
29519
29520  if (_IX2BrowserSupport.IS_BROWSER_ENV && elementRoot) {
29521    return queryDocument(finalSelector).filter(function (element) {
29522      return elementRoot.contains(element);
29523    });
29524  }
29525
29526  if (limitAffectedElements === CHILDREN) {
29527    return queryDocument(baseSelector, finalSelector);
29528  } else if (limitAffectedElements === IMMEDIATE_CHILDREN) {
29529    return getChildElements(queryDocument(baseSelector)).filter(matchSelector(finalSelector));
29530  } else if (limitAffectedElements === SIBLINGS) {
29531    return getSiblingElements(queryDocument(baseSelector)).filter(matchSelector(finalSelector));
29532  } else {
29533    return queryDocument(finalSelector);
29534  }
29535} // $FlowFixMe
29536
29537
29538function getComputedStyle(_ref5) {
29539  var element = _ref5.element,
29540      actionItem = _ref5.actionItem;
29541
29542  if (!_IX2BrowserSupport.IS_BROWSER_ENV) {
29543    return {};
29544  }
29545
29546  var actionTypeId = actionItem.actionTypeId;
29547
29548  switch (actionTypeId) {
29549    case STYLE_SIZE:
29550    case STYLE_BACKGROUND_COLOR:
29551    case STYLE_BORDER:
29552    case STYLE_TEXT_COLOR:
29553    case GENERAL_DISPLAY:
29554      return window.getComputedStyle(element);
29555
29556    default:
29557      return {};
29558  }
29559}
29560
29561var pxValueRegex = /px/;
29562
29563var getFilterDefaults = function getFilterDefaults(actionState, filters) {
29564  return filters.reduce(function (result, filter) {
29565    if (result[filter.type] == null) {
29566      result[filter.type] = filterDefaults[filter.type];
29567    }
29568
29569    return result;
29570  }, actionState || {});
29571};
29572
29573function getInstanceOrigin( // $FlowFixMe
29574element) {
29575  var refState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
29576  var computedStyle = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
29577  var // $FlowFixMe
29578  actionItem = arguments.length > 3 ? arguments[3] : undefined;
29579  var // $FlowFixMe
29580  elementApi = arguments.length > 4 ? arguments[4] : undefined;
29581  var getStyle = elementApi.getStyle;
29582  var actionTypeId = actionItem.actionTypeId,
29583      config = actionItem.config;
29584
29585  if ((0, _IX2VanillaPlugins.isPluginType)(actionTypeId)) {
29586    // $FlowFixMe
29587    return (0, _IX2VanillaPlugins.getPluginOrigin)(actionTypeId)(refState[actionTypeId]);
29588  }
29589
29590  switch (actionTypeId) {
29591    case TRANSFORM_MOVE:
29592    case TRANSFORM_SCALE:
29593    case TRANSFORM_ROTATE:
29594    case TRANSFORM_SKEW:
29595      return refState[actionTypeId] || transformDefaults[actionTypeId];
29596
29597    case STYLE_FILTER:
29598      return getFilterDefaults(refState[actionTypeId], actionItem.config.filters);
29599
29600    case STYLE_OPACITY:
29601      return {
29602        value: (0, _defaultTo["default"])(parseFloat(getStyle(element, OPACITY)), 1.0)
29603      };
29604
29605    case STYLE_SIZE:
29606      {
29607        var inlineWidth = getStyle(element, WIDTH);
29608        var inlineHeight = getStyle(element, HEIGHT);
29609        var widthValue;
29610        var heightValue; // When destination unit is 'AUTO', ensure origin values are in px
29611
29612        if (config.widthUnit === AUTO) {
29613          widthValue = pxValueRegex.test(inlineWidth) ? parseFloat(inlineWidth) : parseFloat(computedStyle.width);
29614        } else {
29615          widthValue = (0, _defaultTo["default"])(parseFloat(inlineWidth), parseFloat(computedStyle.width));
29616        }
29617
29618        if (config.heightUnit === AUTO) {
29619          heightValue = pxValueRegex.test(inlineHeight) ? parseFloat(inlineHeight) : parseFloat(computedStyle.height);
29620        } else {
29621          heightValue = (0, _defaultTo["default"])(parseFloat(inlineHeight), parseFloat(computedStyle.height));
29622        }
29623
29624        return {
29625          widthValue: widthValue,
29626          heightValue: heightValue
29627        };
29628      }
29629
29630    case STYLE_BACKGROUND_COLOR:
29631    case STYLE_BORDER:
29632    case STYLE_TEXT_COLOR:
29633      return parseColor({
29634        element: element,
29635        actionTypeId: actionTypeId,
29636        computedStyle: computedStyle,
29637        getStyle: getStyle
29638      });
29639
29640    case GENERAL_DISPLAY:
29641      return {
29642        value: (0, _defaultTo["default"])(getStyle(element, DISPLAY), computedStyle.display)
29643      };
29644
29645    case OBJECT_VALUE:
29646      return refState[actionTypeId] || {
29647        value: 0
29648      };
29649
29650    default:
29651      return;
29652  }
29653}
29654
29655var reduceFilters = function reduceFilters(result, filter) {
29656  if (filter) {
29657    result[filter.type] = filter.value || 0;
29658  }
29659
29660  return result;
29661}; // $FlowFixMe
29662
29663
29664var getItemConfigByKey = function getItemConfigByKey(actionTypeId, key, config) {
29665  if ((0, _IX2VanillaPlugins.isPluginType)(actionTypeId)) {
29666    // $FlowFixMe
29667    return (0, _IX2VanillaPlugins.getPluginConfig)(actionTypeId)(config, key);
29668  }
29669
29670  switch (actionTypeId) {
29671    case STYLE_FILTER:
29672      {
29673        var filter = (0, _findLast["default"])(config.filters, function (_ref6) {
29674          var type = _ref6.type;
29675          return type === key;
29676        });
29677        return filter ? filter.value : 0;
29678      }
29679
29680    default:
29681      return config[key];
29682  }
29683}; // $FlowFixMe
29684
29685
29686exports.getItemConfigByKey = getItemConfigByKey;
29687
29688function getDestinationValues(_ref7) {
29689  var element = _ref7.element,
29690      actionItem = _ref7.actionItem,
29691      elementApi = _ref7.elementApi;
29692  var actionTypeId = actionItem.actionTypeId;
29693
29694  if ((0, _IX2VanillaPlugins.isPluginType)(actionTypeId)) {
29695    // $FlowFixMe
29696    return (0, _IX2VanillaPlugins.getPluginDestination)(actionTypeId)(actionItem.config);
29697  }
29698
29699  switch (actionTypeId) {
29700    case TRANSFORM_MOVE:
29701    case TRANSFORM_SCALE:
29702    case TRANSFORM_ROTATE:
29703    case TRANSFORM_SKEW:
29704      {
29705        var _actionItem$config = actionItem.config,
29706            xValue = _actionItem$config.xValue,
29707            yValue = _actionItem$config.yValue,
29708            zValue = _actionItem$config.zValue;
29709        return {
29710          xValue: xValue,
29711          yValue: yValue,
29712          zValue: zValue
29713        };
29714      }
29715
29716    case STYLE_SIZE:
29717      {
29718        var getStyle = elementApi.getStyle,
29719            setStyle = elementApi.setStyle,
29720            getProperty = elementApi.getProperty;
29721        var _actionItem$config2 = actionItem.config,
29722            widthUnit = _actionItem$config2.widthUnit,
29723            heightUnit = _actionItem$config2.heightUnit;
29724        var _actionItem$config3 = actionItem.config,
29725            widthValue = _actionItem$config3.widthValue,
29726            heightValue = _actionItem$config3.heightValue;
29727
29728        if (!_IX2BrowserSupport.IS_BROWSER_ENV) {
29729          return {
29730            widthValue: widthValue,
29731            heightValue: heightValue
29732          };
29733        }
29734
29735        if (widthUnit === AUTO) {
29736          var temp = getStyle(element, WIDTH);
29737          setStyle(element, WIDTH, '');
29738          widthValue = getProperty(element, 'offsetWidth');
29739          setStyle(element, WIDTH, temp);
29740        }
29741
29742        if (heightUnit === AUTO) {
29743          var _temp = getStyle(element, HEIGHT);
29744
29745          setStyle(element, HEIGHT, '');
29746          heightValue = getProperty(element, 'offsetHeight');
29747          setStyle(element, HEIGHT, _temp);
29748        }
29749
29750        return {
29751          widthValue: widthValue,
29752          heightValue: heightValue
29753        };
29754      }
29755
29756    case STYLE_BACKGROUND_COLOR:
29757    case STYLE_BORDER:
29758    case STYLE_TEXT_COLOR:
29759      {
29760        var _actionItem$config4 = actionItem.config,
29761            rValue = _actionItem$config4.rValue,
29762            gValue = _actionItem$config4.gValue,
29763            bValue = _actionItem$config4.bValue,
29764            aValue = _actionItem$config4.aValue;
29765        return {
29766          rValue: rValue,
29767          gValue: gValue,
29768          bValue: bValue,
29769          aValue: aValue
29770        };
29771      }
29772
29773    case STYLE_FILTER:
29774      {
29775        return actionItem.config.filters.reduce(reduceFilters, {});
29776      }
29777
29778    default:
29779      {
29780        var value = actionItem.config.value;
29781        return {
29782          value: value
29783        };
29784      }
29785  }
29786} // $FlowFixMe
29787
29788
29789function getRenderType(actionTypeId) {
29790  if (/^TRANSFORM_/.test(actionTypeId)) {
29791    return RENDER_TRANSFORM;
29792  }
29793
29794  if (/^STYLE_/.test(actionTypeId)) {
29795    return RENDER_STYLE;
29796  }
29797
29798  if (/^GENERAL_/.test(actionTypeId)) {
29799    return RENDER_GENERAL;
29800  }
29801
29802  if (/^PLUGIN_/.test(actionTypeId)) {
29803    return RENDER_PLUGIN;
29804  }
29805} // $FlowFixMe
29806
29807
29808function getStyleProp(renderType, actionTypeId) {
29809  return renderType === RENDER_STYLE ? actionTypeId.replace('STYLE_', '').toLowerCase() : null;
29810}
29811
29812function renderHTMLElement( // $FlowFixMe
29813element, // $FlowFixMe
29814refState, // $FlowFixMe
29815actionState, // $FlowFixMe
29816eventId, // $FlowFixMe
29817actionItem, // $FlowFixMe
29818styleProp, // $FlowFixMe
29819elementApi, // $FlowFixMe
29820renderType, // $FlowFixMe
29821pluginInstance) {
29822  switch (renderType) {
29823    case RENDER_TRANSFORM:
29824      {
29825        return renderTransform(element, refState, actionState, actionItem, elementApi);
29826      }
29827
29828    case RENDER_STYLE:
29829      {
29830        return renderStyle(element, refState, actionState, actionItem, styleProp, elementApi);
29831      }
29832
29833    case RENDER_GENERAL:
29834      {
29835        return renderGeneral(element, actionItem, elementApi);
29836      }
29837
29838    case RENDER_PLUGIN:
29839      {
29840        var actionTypeId = actionItem.actionTypeId;
29841
29842        if ((0, _IX2VanillaPlugins.isPluginType)(actionTypeId)) {
29843          // $FlowFixMe
29844          return (0, _IX2VanillaPlugins.renderPlugin)(actionTypeId)(pluginInstance, refState, actionItem);
29845        }
29846      }
29847  }
29848}
29849
29850var transformDefaults = (_transformDefaults = {}, (0, _defineProperty2["default"])(_transformDefaults, TRANSFORM_MOVE, Object.freeze({
29851  xValue: 0,
29852  yValue: 0,
29853  zValue: 0
29854})), (0, _defineProperty2["default"])(_transformDefaults, TRANSFORM_SCALE, Object.freeze({
29855  xValue: 1,
29856  yValue: 1,
29857  zValue: 1
29858})), (0, _defineProperty2["default"])(_transformDefaults, TRANSFORM_ROTATE, Object.freeze({
29859  xValue: 0,
29860  yValue: 0,
29861  zValue: 0
29862})), (0, _defineProperty2["default"])(_transformDefaults, TRANSFORM_SKEW, Object.freeze({
29863  xValue: 0,
29864  yValue: 0
29865})), _transformDefaults);
29866var filterDefaults = Object.freeze({
29867  blur: 0,
29868  'hue-rotate': 0,
29869  invert: 0,
29870  grayscale: 0,
29871  saturate: 100,
29872  sepia: 0,
29873  contrast: 100,
29874  brightness: 100
29875});
29876
29877var getFilterUnit = function getFilterUnit(filterType, actionItemConfig) {
29878  var filter = (0, _findLast["default"])(actionItemConfig.filters, function (_ref8) {
29879    var type = _ref8.type;
29880    return type === filterType;
29881  });
29882
29883  if (filter && filter.unit) {
29884    return filter.unit;
29885  }
29886
29887  switch (filterType) {
29888    case 'blur':
29889      return 'px';
29890
29891    case 'hue-rotate':
29892      return 'deg';
29893
29894    default:
29895      return '%';
29896  }
29897};
29898
29899var transformKeys = Object.keys(transformDefaults);
29900
29901function renderTransform(element, refState, actionState, actionItem, elementApi) {
29902  var newTransform = transformKeys.map(function (actionTypeId) {
29903    var defaults = transformDefaults[actionTypeId];
29904
29905    var _ref9 = refState[actionTypeId] || {},
29906        _ref9$xValue = _ref9.xValue,
29907        xValue = _ref9$xValue === void 0 ? defaults.xValue : _ref9$xValue,
29908        _ref9$yValue = _ref9.yValue,
29909        yValue = _ref9$yValue === void 0 ? defaults.yValue : _ref9$yValue,
29910        _ref9$zValue = _ref9.zValue,
29911        zValue = _ref9$zValue === void 0 ? defaults.zValue : _ref9$zValue,
29912        _ref9$xUnit = _ref9.xUnit,
29913        xUnit = _ref9$xUnit === void 0 ? '' : _ref9$xUnit,
29914        _ref9$yUnit = _ref9.yUnit,
29915        yUnit = _ref9$yUnit === void 0 ? '' : _ref9$yUnit,
29916        _ref9$zUnit = _ref9.zUnit,
29917        zUnit = _ref9$zUnit === void 0 ? '' : _ref9$zUnit;
29918
29919    switch (actionTypeId) {
29920      case TRANSFORM_MOVE:
29921        return "".concat(TRANSLATE_3D, "(").concat(xValue).concat(xUnit, ", ").concat(yValue).concat(yUnit, ", ").concat(zValue).concat(zUnit, ")");
29922
29923      case TRANSFORM_SCALE:
29924        return "".concat(SCALE_3D, "(").concat(xValue).concat(xUnit, ", ").concat(yValue).concat(yUnit, ", ").concat(zValue).concat(zUnit, ")");
29925
29926      case TRANSFORM_ROTATE:
29927        return "".concat(ROTATE_X, "(").concat(xValue).concat(xUnit, ") ").concat(ROTATE_Y, "(").concat(yValue).concat(yUnit, ") ").concat(ROTATE_Z, "(").concat(zValue).concat(zUnit, ")");
29928
29929      case TRANSFORM_SKEW:
29930        return "".concat(SKEW, "(").concat(xValue).concat(xUnit, ", ").concat(yValue).concat(yUnit, ")");
29931
29932      default:
29933        return '';
29934    }
29935  }).join(' ');
29936  var setStyle = elementApi.setStyle;
29937  addWillChange(element, _IX2BrowserSupport.TRANSFORM_PREFIXED, elementApi);
29938  setStyle(element, _IX2BrowserSupport.TRANSFORM_PREFIXED, newTransform); // Set transform-style: preserve-3d
29939
29940  if (hasDefined3dTransform(actionItem, actionState)) {
29941    setStyle(element, _IX2BrowserSupport.TRANSFORM_STYLE_PREFIXED, PRESERVE_3D);
29942  }
29943}
29944
29945function renderFilter(element, actionState, actionItemConfig, elementApi) {
29946  var filterValue = (0, _reduce["default"])(actionState, function (result, value, type) {
29947    return "".concat(result, " ").concat(type, "(").concat(value).concat(getFilterUnit(type, actionItemConfig), ")");
29948  }, '');
29949  var setStyle = elementApi.setStyle;
29950  addWillChange(element, FILTER, elementApi);
29951  setStyle(element, FILTER, filterValue);
29952}
29953
29954function hasDefined3dTransform(_ref10, _ref11) {
29955  var actionTypeId = _ref10.actionTypeId;
29956  var xValue = _ref11.xValue,
29957      yValue = _ref11.yValue,
29958      zValue = _ref11.zValue;
29959  // TRANSLATE_Z
29960  return actionTypeId === TRANSFORM_MOVE && zValue !== undefined || // SCALE_Z
29961  actionTypeId === TRANSFORM_SCALE && zValue !== undefined || // ROTATE_X or ROTATE_Y
29962  actionTypeId === TRANSFORM_ROTATE && (xValue !== undefined || yValue !== undefined);
29963}
29964
29965var paramCapture = '\\(([^)]+)\\)';
29966var rgbValidRegex = /^rgb/;
29967var rgbMatchRegex = RegExp("rgba?".concat(paramCapture));
29968
29969function getFirstMatch(regex, value) {
29970  var match = regex.exec(value);
29971  return match ? match[1] : '';
29972}
29973
29974function parseColor(_ref12) {
29975  var element = _ref12.element,
29976      actionTypeId = _ref12.actionTypeId,
29977      computedStyle = _ref12.computedStyle,
29978      getStyle = _ref12.getStyle;
29979  var prop = colorStyleProps[actionTypeId];
29980  var inlineValue = getStyle(element, prop);
29981  var value = rgbValidRegex.test(inlineValue) ? inlineValue : computedStyle[prop];
29982  var matches = getFirstMatch(rgbMatchRegex, value).split(COMMA_DELIMITER);
29983  return {
29984    rValue: (0, _defaultTo["default"])(parseInt(matches[0], 10), 255),
29985    gValue: (0, _defaultTo["default"])(parseInt(matches[1], 10), 255),
29986    bValue: (0, _defaultTo["default"])(parseInt(matches[2], 10), 255),
29987    aValue: (0, _defaultTo["default"])(parseFloat(matches[3]), 1)
29988  };
29989}
29990
29991function renderStyle(element, refState, actionState, actionItem, styleProp, elementApi) {
29992  var setStyle = elementApi.setStyle;
29993  var actionTypeId = actionItem.actionTypeId,
29994      config = actionItem.config;
29995
29996  switch (actionTypeId) {
29997    case STYLE_SIZE:
29998      {
29999        var _actionItem$config5 = actionItem.config,
30000            _actionItem$config5$w = _actionItem$config5.widthUnit,
30001            widthUnit = _actionItem$config5$w === void 0 ? '' : _actionItem$config5$w,
30002            _actionItem$config5$h = _actionItem$config5.heightUnit,
30003            heightUnit = _actionItem$config5$h === void 0 ? '' : _actionItem$config5$h;
30004        var widthValue = actionState.widthValue,
30005            heightValue = actionState.heightValue;
30006
30007        if (widthValue !== undefined) {
30008          if (widthUnit === AUTO) {
30009            widthUnit = 'px';
30010          }
30011
30012          addWillChange(element, WIDTH, elementApi);
30013          setStyle(element, WIDTH, widthValue + widthUnit);
30014        }
30015
30016        if (heightValue !== undefined) {
30017          if (heightUnit === AUTO) {
30018            heightUnit = 'px';
30019          }
30020
30021          addWillChange(element, HEIGHT, elementApi);
30022          setStyle(element, HEIGHT, heightValue + heightUnit);
30023        }
30024
30025        break;
30026      }
30027
30028    case STYLE_FILTER:
30029      {
30030        renderFilter(element, actionState, config, elementApi);
30031        break;
30032      }
30033
30034    case STYLE_BACKGROUND_COLOR:
30035    case STYLE_BORDER:
30036    case STYLE_TEXT_COLOR:
30037      {
30038        var prop = colorStyleProps[actionTypeId];
30039        var rValue = Math.round(actionState.rValue);
30040        var gValue = Math.round(actionState.gValue);
30041        var bValue = Math.round(actionState.bValue);
30042        var aValue = actionState.aValue;
30043        addWillChange(element, prop, elementApi);
30044        setStyle(element, prop, aValue >= 1 ? "rgb(".concat(rValue, ",").concat(gValue, ",").concat(bValue, ")") : "rgba(".concat(rValue, ",").concat(gValue, ",").concat(bValue, ",").concat(aValue, ")"));
30045        break;
30046      }
30047
30048    default:
30049      {
30050        var _config$unit = config.unit,
30051            unit = _config$unit === void 0 ? '' : _config$unit;
30052        addWillChange(element, styleProp, elementApi);
30053        setStyle(element, styleProp, actionState.value + unit);
30054        break;
30055      }
30056  }
30057}
30058
30059function renderGeneral(element, actionItem, elementApi) {
30060  var setStyle = elementApi.setStyle;
30061
30062  switch (actionItem.actionTypeId) {
30063    case GENERAL_DISPLAY:
30064      {
30065        var value = actionItem.config.value;
30066
30067        if (value === FLEX && _IX2BrowserSupport.IS_BROWSER_ENV) {
30068          setStyle(element, DISPLAY, _IX2BrowserSupport.FLEX_PREFIXED);
30069        } else {
30070          setStyle(element, DISPLAY, value);
30071        }
30072
30073        return;
30074      }
30075  }
30076}
30077
30078function addWillChange(element, prop, elementApi) {
30079  if (!_IX2BrowserSupport.IS_BROWSER_ENV) {
30080    return;
30081  } // $FlowFixMe
30082
30083
30084  var validProp = willChangeProps[prop];
30085
30086  if (!validProp) {
30087    return;
30088  }
30089
30090  var getStyle = elementApi.getStyle,
30091      setStyle = elementApi.setStyle;
30092  var value = getStyle(element, WILL_CHANGE);
30093
30094  if (!value) {
30095    setStyle(element, WILL_CHANGE, validProp);
30096    return;
30097  }
30098
30099  var values = value.split(COMMA_DELIMITER).map(trim);
30100
30101  if (values.indexOf(validProp) === -1) {
30102    setStyle(element, WILL_CHANGE, values.concat(validProp).join(COMMA_DELIMITER));
30103  }
30104}
30105
30106function removeWillChange(element, prop, elementApi) {
30107  if (!_IX2BrowserSupport.IS_BROWSER_ENV) {
30108    return;
30109  } // $FlowFixMe
30110
30111
30112  var validProp = willChangeProps[prop];
30113
30114  if (!validProp) {
30115    return;
30116  }
30117
30118  var getStyle = elementApi.getStyle,
30119      setStyle = elementApi.setStyle;
30120  var value = getStyle(element, WILL_CHANGE);
30121
30122  if (!value || value.indexOf(validProp) === -1) {
30123    return;
30124  }
30125
30126  setStyle(element, WILL_CHANGE, value.split(COMMA_DELIMITER).map(trim).filter(function (v) {
30127    return v !== validProp;
30128  }).join(COMMA_DELIMITER));
30129} // $FlowFixMe
30130
30131
30132function clearAllStyles(_ref13) {
30133  var store = _ref13.store,
30134      elementApi = _ref13.elementApi;
30135
30136  var _store$getState = store.getState(),
30137      ixData = _store$getState.ixData;
30138
30139  var _ixData$events = ixData.events,
30140      events = _ixData$events === void 0 ? {} : _ixData$events,
30141      _ixData$actionLists = ixData.actionLists,
30142      actionLists = _ixData$actionLists === void 0 ? {} : _ixData$actionLists;
30143  Object.keys(events).forEach(function (eventId) {
30144    var event = events[eventId];
30145    var config = event.action.config;
30146    var actionListId = config.actionListId;
30147    var actionList = actionLists[actionListId];
30148
30149    if (actionList) {
30150      clearActionListStyles({
30151        actionList: actionList,
30152        event: event,
30153        elementApi: elementApi
30154      });
30155    }
30156  });
30157  Object.keys(actionLists).forEach(function (actionListId) {
30158    clearActionListStyles({
30159      actionList: actionLists[actionListId],
30160      elementApi: elementApi
30161    });
30162  });
30163} // $FlowFixMe
30164
30165
30166function clearActionListStyles(_ref14) {
30167  var _ref14$actionList = _ref14.actionList,
30168      actionList = _ref14$actionList === void 0 ? {} : _ref14$actionList,
30169      event = _ref14.event,
30170      elementApi = _ref14.elementApi;
30171  var actionItemGroups = actionList.actionItemGroups,
30172      continuousParameterGroups = actionList.continuousParameterGroups;
30173  actionItemGroups && actionItemGroups.forEach(function (actionGroup) {
30174    clearActionGroupStyles({
30175      actionGroup: actionGroup,
30176      event: event,
30177      elementApi: elementApi
30178    });
30179  });
30180  continuousParameterGroups && continuousParameterGroups.forEach(function (paramGroup) {
30181    var continuousActionGroups = paramGroup.continuousActionGroups;
30182    continuousActionGroups.forEach(function (actionGroup) {
30183      clearActionGroupStyles({
30184        actionGroup: actionGroup,
30185        event: event,
30186        elementApi: elementApi
30187      });
30188    });
30189  });
30190}
30191
30192function clearActionGroupStyles(_ref15) {
30193  var actionGroup = _ref15.actionGroup,
30194      event = _ref15.event,
30195      elementApi = _ref15.elementApi;
30196  var actionItems = actionGroup.actionItems;
30197  actionItems.forEach(function (_ref16) {
30198    var actionTypeId = _ref16.actionTypeId,
30199        config = _ref16.config;
30200    var clearElement;
30201
30202    if ((0, _IX2VanillaPlugins.isPluginType)(actionTypeId)) {
30203      clearElement = (0, _IX2VanillaPlugins.clearPlugin)(actionTypeId);
30204    } else {
30205      clearElement = processElementByType({
30206        effect: clearStyleProp,
30207        actionTypeId: actionTypeId,
30208        elementApi: elementApi
30209      });
30210    }
30211
30212    getAffectedElements({
30213      config: config,
30214      event: event,
30215      elementApi: elementApi
30216    }
30216).forEach(clearElement);
30217  });
30218} // $FlowFixMe
30219
30220
30221function cleanupHTMLElement(element, actionItem, elementApi) {
30222  var setStyle = elementApi.setStyle,
30223      getStyle = elementApi.getStyle;
30224  var actionTypeId = actionItem.actionTypeId;
30225
30226  if (actionTypeId === STYLE_SIZE) {
30227    var config = actionItem.config;
30228
30229    if (config.widthUnit === AUTO) {
30230      setStyle(element, WIDTH, '');
30231    }
30232
30233    if (config.heightUnit === AUTO) {
30234      setStyle(element, HEIGHT, '');
30235    }
30236  }
30237
30238  if (getStyle(element, WILL_CHANGE)) {
30239    processElementByType({
30240      effect: removeWillChange,
30241      actionTypeId: actionTypeId,
30242      elementApi: elementApi
30243    })(element);
30244  }
30245}
30246
30247var processElementByType = function processElementByType(_ref17) {
30248  var effect = _ref17.effect,
30249      actionTypeId = _ref17.actionTypeId,
30250      elementApi = _ref17.elementApi;
30251  return function (element) {
30252    switch (actionTypeId) {
30253      case TRANSFORM_MOVE:
30254      case TRANSFORM_SCALE:
30255      case TRANSFORM_ROTATE:
30256      case TRANSFORM_SKEW:
30257        effect(element, _IX2BrowserSupport.TRANSFORM_PREFIXED, elementApi);
30258        break;
30259
30260      case STYLE_FILTER:
30261        effect(element, FILTER, elementApi);
30262        break;
30263
30264      case STYLE_OPACITY:
30265        effect(element, OPACITY, elementApi);
30266        break;
30267
30268      case STYLE_SIZE:
30269        effect(element, WIDTH, elementApi);
30270        effect(element, HEIGHT, elementApi);
30271        break;
30272
30273      case STYLE_BACKGROUND_COLOR:
30274      case STYLE_BORDER:
30275      case STYLE_TEXT_COLOR:
30276        effect(element, colorStyleProps[actionTypeId], elementApi);
30277        break;
30278
30279      case GENERAL_DISPLAY:
30280        effect(element, DISPLAY, elementApi);
30281        break;
30282    }
30283  };
30284};
30285
30286function clearStyleProp(element, prop, elementApi) {
30287  var setStyle = elementApi.setStyle;
30288  removeWillChange(element, prop, elementApi);
30289  setStyle(element, prop, ''); // Clear transform-style: preserve-3d
30290
30291  if (prop === _IX2BrowserSupport.TRANSFORM_PREFIXED) {
30292    setStyle(element, _IX2BrowserSupport.TRANSFORM_STYLE_PREFIXED, '');
30293  }
30294} // $FlowFixMe
30295
30296
30297function getMaxDurationItemIndex(actionItems) {
30298  var maxDuration = 0;
30299  var resultIndex = 0;
30300  actionItems.forEach(function (actionItem, index) {
30301    var config = actionItem.config;
30302    var total = config.delay + config.duration;
30303
30304    if (total >= maxDuration) {
30305      maxDuration = total;
30306      resultIndex = index;
30307    }
30308  });
30309  return resultIndex;
30310} // $FlowFixMe
30311
30312
30313function getActionListProgress(actionList, instance) {
30314  var actionItemGroups = actionList.actionItemGroups,
30315      useFirstGroupAsInitialState = actionList.useFirstGroupAsInitialState;
30316  var instanceItem = instance.actionItem,
30317      _instance$verboseTime = instance.verboseTimeElapsed,
30318      verboseTimeElapsed = _instance$verboseTime === void 0 ? 0 : _instance$verboseTime;
30319  var totalDuration = 0;
30320  var elapsedDuration = 0;
30321  actionItemGroups.forEach(function (group, index) {
30322    if (useFirstGroupAsInitialState && index === 0) {
30323      return;
30324    }
30325
30326    var actionItems = group.actionItems;
30327    var carrierItem = actionItems[getMaxDurationItemIndex(actionItems)];
30328    var config = carrierItem.config,
30329        actionTypeId = carrierItem.actionTypeId;
30330
30331    if (instanceItem.id === carrierItem.id) {
30332      elapsedDuration = totalDuration + verboseTimeElapsed;
30333    }
30334
30335    var duration = getRenderType(actionTypeId) === RENDER_GENERAL ? 0 : config.duration;
30336    totalDuration += config.delay + duration;
30337  });
30338  return totalDuration > 0 ? (0, _IX2EasingUtils.optimizeFloat)(elapsedDuration / totalDuration) : 0;
30339} // $FlowFixMe
30340
30341
30342function reduceListToGroup(_ref18) {
30343  var actionList = _ref18.actionList,
30344      actionItemId = _ref18.actionItemId,
30345      rawData = _ref18.rawData;
30346  var actionItemGroups = actionList.actionItemGroups,
30347      continuousParameterGroups = actionList.continuousParameterGroups;
30348  var newActionItems = [];
30349
30350  var takeItemUntilMatch = function takeItemUntilMatch(actionItem) {
30351    newActionItems.push((0, _timm.mergeIn)(actionItem, ['config'], {
30352      delay: 0,
30353      duration: 0
30354    }));
30355    return actionItem.id === actionItemId;
30356  };
30357
30358  actionItemGroups && actionItemGroups.some(function (_ref19) {
30359    var actionItems = _ref19.actionItems;
30360    return actionItems.some(takeItemUntilMatch);
30361  });
30362  continuousParameterGroups && continuousParameterGroups.some(function (paramGroup) {
30363    var continuousActionGroups = paramGroup.continuousActionGroups;
30364    return continuousActionGroups.some(function (_ref20) {
30365      var actionItems = _ref20.actionItems;
30366      return actionItems.some(takeItemUntilMatch);
30367    });
30368  });
30369  return (0, _timm.setIn)(rawData, ['actionLists'], (0, _defineProperty2["default"])({}, actionList.id, {
30370    id: actionList.id,
30371    actionItemGroups: [{
30372      actionItems: newActionItems
30373    }]
30374  }));
30375} // $FlowFixMe
30376
30377
30378function shouldNamespaceEventParameter(eventTypeId, _ref22) {
30379  var basedOn = _ref22.basedOn;
30380  return eventTypeId === _constants.EventTypeConsts.SCROLLING_IN_VIEW && (basedOn === _constants.EventBasedOn.ELEMENT || basedOn == null) || eventTypeId === _constants.EventTypeConsts.MOUSE_MOVE && basedOn === _constants.EventBasedOn.ELEMENT;
30381}
30382
30383function getNamespacedParameterId(eventStateKey, continuousParameterGroupId) {
30384  var namespacedParameterId = eventStateKey + COLON_DELIMITER + continuousParameterGroupId;
30385  return namespacedParameterId;
30386} // $FlowFixMe
30387
30388
30389function shouldAllowMediaQuery(mediaQueries, mediaQueryKey) {
30390  // During design mode, current media query key does not exist
30391  if (mediaQueryKey == null) {
30392    return true;
30393  }
30394
30395  return mediaQueries.indexOf(mediaQueryKey) !== -1;
30396} // $FlowFixMe
30397
30398
30399function mediaQueriesEqual(listA, listB) {
30400  return (0, _shallowEqual["default"])(listA && listA.sort(), listB && listB.sort());
30401} // $FlowFixMe
30402
30403
30404function stringifyTarget(target) {
30405  if (typeof target === 'string') {
30406    return target;
30407  }
30408
30409  var _target$id = target.id,
30410      id = _target$id === void 0 ? '' : _target$id,
30411      _target$selector = target.selector,
30412      selector = _target$selector === void 0 ? '' : _target$selector,
30413      _target$useEventTarge = target.useEventTarget,
30414      useEventTarget = _target$useEventTarge === void 0 ? '' : _target$useEventTarge;
30415  return id + BAR_DELIMITER + selector + BAR_DELIMITER + useEventTarget;
30416}
30417
30418/***/ }),
30419/* 319 */
vendor: 9,324 bytes, lines 30420-30753
30420/***/ (function(module, exports) {
30421
30422/**
30423 * Checks `value` to determine whether a default value should be returned in
30424 * its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
30425 * or `undefined`.
30426 *
30427 * @static
30428 * @memberOf _
30429 * @since 4.14.0
30430 * @category Util
30431 * @param {*} value The value to check.
30432 * @param {*} defaultValue The default value.
30433 * @returns {*} Returns the resolved value.
30434 * @example
30435 *
30436 * _.defaultTo(1, 10);
30437 * // => 1
30438 *
30439 * _.defaultTo(undefined, 10);
30440 * // => 10
30441 */
30442function defaultTo(value, defaultValue) {
30443  return (value == null || value !== value) ? defaultValue : value;
30444}
30445
30446module.exports = defaultTo;
30447
30448
30449/***/ }),
30450/* 320 */
30451/***/ (function(module, exports, __webpack_require__) {
30452
30453var arrayReduce = __webpack_require__(321),
30454    baseEach = __webpack_require__(142),
30455    baseIteratee = __webpack_require__(18),
30456    baseReduce = __webpack_require__(325),
30457    isArray = __webpack_require__(2);
30458
30459/**
30460 * Reduces `collection` to a value which is the accumulated result of running
30461 * each element in `collection` thru `iteratee`, where each successive
30462 * invocation is supplied the return value of the previous. If `accumulator`
30463 * is not given, the first element of `collection` is used as the initial
30464 * value. The iteratee is invoked with four arguments:
30465 * (accumulator, value, index|key, collection).
30466 *
30467 * Many lodash methods are guarded to work as iteratees for methods like
30468 * `_.reduce`, `_.reduceRight`, and `_.transform`.
30469 *
30470 * The guarded methods are:
30471 * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
30472 * and `sortBy`
30473 *
30474 * @static
30475 * @memberOf _
30476 * @since 0.1.0
30477 * @category Collection
30478 * @param {Array|Object} collection The collection to iterate over.
30479 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
30480 * @param {*} [accumulator] The initial value.
30481 * @returns {*} Returns the accumulated value.
30482 * @see _.reduceRight
30483 * @example
30484 *
30485 * _.reduce([1, 2], function(sum, n) {
30486 *   return sum + n;
30487 * }, 0);
30488 * // => 3
30489 *
30490 * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
30491 *   (result[value] || (result[value] = [])).push(key);
30492 *   return result;
30493 * }, {});
30494 * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
30495 */
30496function reduce(collection, iteratee, accumulator) {
30497  var func = isArray(collection) ? arrayReduce : baseReduce,
30498      initAccum = arguments.length < 3;
30499
30500  return func(collection, baseIteratee(iteratee, 4), accumulator, initAccum, baseEach);
30501}
30502
30503module.exports = reduce;
30504
30505
30506/***/ }),
30507/* 321 */
30508/***/ (function(module, exports) {
30509
30510/**
30511 * A specialized version of `_.reduce` for arrays without support for
30512 * iteratee shorthands.
30513 *
30514 * @private
30515 * @param {Array} [array] The array to iterate over.
30516 * @param {Function} iteratee The function invoked per iteration.
30517 * @param {*} [accumulator] The initial value.
30518 * @param {boolean} [initAccum] Specify using the first element of `array` as
30519 *  the initial value.
30520 * @returns {*} Returns the accumulated value.
30521 */
30522function arrayReduce(array, iteratee, accumulator, initAccum) {
30523  var index = -1,
30524      length = array == null ? 0 : array.length;
30525
30526  if (initAccum && length) {
30527    accumulator = array[++index];
30528  }
30529  while (++index < length) {
30530    accumulator = iteratee(accumulator, array[index], index, array);
30531  }
30532  return accumulator;
30533}
30534
30535module.exports = arrayReduce;
30536
30537
30538/***/ }),
30539/* 322 */
30540/***/ (function(module, exports, __webpack_require__) {
30541
30542var createBaseFor = __webpack_require__(323);
30543
30544/**
30545 * The base implementation of `baseForOwn` which iterates over `object`
30546 * properties returned by `keysFunc` and invokes `iteratee` for each property.
30547 * Iteratee functions may exit iteration early by explicitly returning `false`.
30548 *
30549 * @private
30550 * @param {Object} object The object to iterate over.
30551 * @param {Function} iteratee The function invoked per iteration.
30552 * @param {Function} keysFunc The function to get the keys of `object`.
30553 * @returns {Object} Returns `object`.
30554 */
30555var baseFor = createBaseFor();
30556
30557module.exports = baseFor;
30558
30559
30560/***/ }),
30561/* 323 */
30562/***/ (function(module, exports) {
30563
30564/**
30565 * Creates a base function for methods like `_.forIn` and `_.forOwn`.
30566 *
30567 * @private
30568 * @param {boolean} [fromRight] Specify iterating from right to left.
30569 * @returns {Function} Returns the new base function.
30570 */
30571function createBaseFor(fromRight) {
30572  return function(object, iteratee, keysFunc) {
30573    var index = -1,
30574        iterable = Object(object),
30575        props = keysFunc(object),
30576        length = props.length;
30577
30578    while (length--) {
30579      var key = props[fromRight ? length : ++index];
30580      if (iteratee(iterable[key], key, iterable) === false) {
30581        break;
30582      }
30583    }
30584    return object;
30585  };
30586}
30587
30588module.exports = createBaseFor;
30589
30590
30591/***/ }),
30592/* 324 */
30593/***/ (function(module, exports, __webpack_require__) {
30594
30595var isArrayLike = __webpack_require__(25);
30596
30597/**
30598 * Creates a `baseEach` or `baseEachRight` function.
30599 *
30600 * @private
30601 * @param {Function} eachFunc The function to iterate over a collection.
30602 * @param {boolean} [fromRight] Specify iterating from right to left.
30603 * @returns {Function} Returns the new base function.
30604 */
30605function createBaseEach(eachFunc, fromRight) {
30606  return function(collection, iteratee) {
30607    if (collection == null) {
30608      return collection;
30609    }
30610    if (!isArrayLike(collection)) {
30611      return eachFunc(collection, iteratee);
30612    }
30613    var length = collection.length,
30614        index = fromRight ? length : -1,
30615        iterable = Object(collection);
30616
30617    while ((fromRight ? index-- : ++index < length)) {
30618      if (iteratee(iterable[index], index, iterable) === false) {
30619        break;
30620      }
30621    }
30622    return collection;
30623  };
30624}
30625
30626module.exports = createBaseEach;
30627
30628
30629/***/ }),
30630/* 325 */
30631/***/ (function(module, exports) {
30632
30633/**
30634 * The base implementation of `_.reduce` and `_.reduceRight`, without support
30635 * for iteratee shorthands, which iterates over `collection` using `eachFunc`.
30636 *
30637 * @private
30638 * @param {Array|Object} collection The collection to iterate over.
30639 * @param {Function} iteratee The function invoked per iteration.
30640 * @param {*} accumulator The initial value.
30641 * @param {boolean} initAccum Specify using the first or last element of
30642 *  `collection` as the initial value.
30643 * @param {Function} eachFunc The function to iterate over `collection`.
30644 * @returns {*} Returns the accumulated value.
30645 */
30646function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
30647  eachFunc(collection, function(value, index, collection) {
30648    accumulator = initAccum
30649      ? (initAccum = false, value)
30650      : iteratee(accumulator, value, index, collection);
30651  });
30652  return accumulator;
30653}
30654
30655module.exports = baseReduce;
30656
30657
30658/***/ }),
30659/* 326 */
30660/***/ (function(module, exports, __webpack_require__) {
30661
30662var createFind = __webpack_require__(136),
30663    findLastIndex = __webpack_require__(327);
30664
30665/**
30666 * This method is like `_.find` except that it iterates over elements of
30667 * `collection` from right to left.
30668 *
30669 * @static
30670 * @memberOf _
30671 * @since 2.0.0
30672 * @category Collection
30673 * @param {Array|Object} collection The collection to inspect.
30674 * @param {Function} [predicate=_.identity] The function invoked per iteration.
30675 * @param {number} [fromIndex=collection.length-1] The index to search from.
30676 * @returns {*} Returns the matched element, else `undefined`.
30677 * @example
30678 *
30679 * _.findLast([1, 2, 3, 4], function(n) {
30680 *   return n % 2 == 1;
30681 * });
30682 * // => 3
30683 */
30684var findLast = createFind(findLastIndex);
30685
30686module.exports = findLast;
30687
30688
30689/***/ }),
30690/* 327 */
30691/***/ (function(module, exports, __webpack_require__) {
30692
30693var baseFindIndex = __webpack_require__(93),
30694    baseIteratee = __webpack_require__(18),
30695    toInteger = __webpack_require__(111);
30696
30697/* Built-in method references for those with the same name as other `lodash` methods. */
30698var nativeMax = Math.max,
30699    nativeMin = Math.min;
30700
30701/**
30702 * This method is like `_.findIndex` except that it iterates over elements
30703 * of `collection` from right to left.
30704 *
30705 * @static
30706 * @memberOf _
30707 * @since 2.0.0
30708 * @category Array
30709 * @param {Array} array The array to inspect.
30710 * @param {Function} [predicate=_.identity] The function invoked per iteration.
30711 * @param {number} [fromIndex=array.length-1] The index to search from.
30712 * @returns {number} Returns the index of the found element, else `-1`.
30713 * @example
30714 *
30715 * var users = [
30716 *   { 'user': 'barney',  'active': true },
30717 *   { 'user': 'fred',    'active': false },
30718 *   { 'user': 'pebbles', 'active': false }
30719 * ];
30720 *
30721 * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
30722 * // => 2
30723 *
30724 * // The `_.matches` iteratee shorthand.
30725 * _.findLastIndex(users, { 'user': 'barney', 'active': true });
30726 * // => 0
30727 *
30728 * // The `_.matchesProperty` iteratee shorthand.
30729 * _.findLastIndex(users, ['active', false]);
30730 * // => 2
30731 *
30732 * // The `_.property` iteratee shorthand.
30733 * _.findLastIndex(users, 'active');
30734 * // => 0
30735 */
30736function findLastIndex(array, predicate, fromIndex) {
30737  var length = array == null ? 0 : array.length;
30738  if (!length) {
30739    return -1;
30740  }
30741  var index = length - 1;
30742  if (fromIndex !== undefined) {
30743    index = toInteger(fromIndex);
30744    index = fromIndex < 0
30745      ? nativeMax(length + index, 0)
30746      : nativeMin(index, length - 1);
30747  }
30748  return baseFindIndex(array, baseIteratee(predicate, 3), index, true);
30749}
30750
30751module.exports = findLastIndex;
30752
30753
30754/***/ }),
30755/* 328 */
30756/***/ (function(module, exports) {
30757
30758function _interopRequireDefault(obj) {
30759  return obj && obj.__esModule ? obj : {
30760    default: obj
30761  };
30762}
30763
30764module.exports = _interopRequireDefault;
30765
30766/***/ }),
30767/* 329 */
30768/***/ (function(module, exports, __webpack_require__) {
30769
30770"use strict";
30771/**
30772 * Copyright (c) 2013-present, Facebook, Inc.
30773 *
30774 * This source code is licensed under the MIT license found in the
30775 * LICENSE file in the root directory of this source tree.
30776 *
30777 * @typechecks
30778 * 
30779 */
30780
30781/*eslint-disable no-self-compare */
30782
30783
30784
30785var hasOwnProperty = Object.prototype.hasOwnProperty;
30786
30787/**
30788 * inlined Object.is polyfill to avoid requiring consumers ship their own
30789 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
30790 */
30791function is(x, y) {
30792  // SameValue algorithm
30793  if (x === y) {
30794    // Steps 1-5, 7-10
30795    // Steps 6.b-6.e: +0 != -0
30796    // Added the nonzero y check to make Flow happy, but it is redundant
30797    return x !== 0 || y !== 0 || 1 / x === 1 / y;
30798  } else {
30799    // Step 6.a: NaN == NaN
30800    return x !== x && y !== y;
30801  }
30802}
30803
30804/**
30805 * Performs equality by iterating through keys on an object and returning false
30806 * when any key has values which are not strictly equal between the arguments.
30807 * Returns true when the values of all keys are strictly equal.
30808 */
30809function shallowEqual(objA, objB) {
30810  if (is(objA, objB)) {
30811    return true;
30812  }
30813
30814  if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
30815    return false;
30816  }
30817
30818  var keysA = Object.keys(objA);
30819  var keysB = Object.keys(objB);
30820
30821  if (keysA.length !== keysB.length) {
30822    return false;
30823  }
30824
30825  // Test for A's keys different from B.
30826  for (var i = 0; i < keysA.length; i++) {
30827    if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
30828      return false;
30829    }
30830  }
30831
30832  return true;
30833}
30834
30835module.exports = shallowEqual;
30836
30837/***/ }),
30838/* 330 */
30839/***/ (function(module, exports, __webpack_require__) {
30840
30841"use strict";
30842
30843
30844Object.defineProperty(exports, "__esModule", {
30845  value: true
30846});
30847exports.ixInstances = void 0;
30848
30849var _constants = __webpack_require__(6);
30850
30851var _shared = __webpack_require__(29);
30852
30853var _timm = __webpack_require__(40);
30854/* eslint-env browser */
30855
30856
30857var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
30858    IX2_RAW_DATA_IMPORTED = _constants$IX2EngineA.IX2_RAW_DATA_IMPORTED,
30859    IX2_SESSION_STOPPED = _constants$IX2EngineA.IX2_SESSION_STOPPED,
30860    IX2_INSTANCE_ADDED = _constants$IX2EngineA.IX2_INSTANCE_ADDED,
30861    IX2_INSTANCE_STARTED = _constants$IX2EngineA.IX2_INSTANCE_STARTED,
30862    IX2_INSTANCE_REMOVED = _constants$IX2EngineA.IX2_INSTANCE_REMOVED,
30863    IX2_ANIMATION_FRAME_CHANGED = _constants$IX2EngineA.IX2_ANIMATION_FRAME_CHANGED;
30864var _shared$IX2EasingUtil = _shared.IX2EasingUtils,
30865    optimizeFloat = _shared$IX2EasingUtil.optimizeFloat,
30866    applyEasing = _shared$IX2EasingUtil.applyEasing,
30867    createBezierEasing = _shared$IX2EasingUtil.createBezierEasing;
30868var RENDER_GENERAL = _constants.IX2EngineConstants.RENDER_GENERAL;
30869var _shared$IX2VanillaUti = _shared.IX2VanillaUtils,
30870    getItemConfigByKey = _shared$IX2VanillaUti.getItemConfigByKey,
30871    getRenderType = _shared$IX2VanillaUti.getRenderType,
30872    getStyleProp = _shared$IX2VanillaUti.getStyleProp;
30873
30874var continuousInstance = function continuousInstance(state, action) {
30875  var lastPosition = state.position,
30876      parameterId = state.parameterId,
30877      actionGroups = state.actionGroups,
30878      destinationKeys = state.destinationKeys,
30879      smoothing = state.smoothing,
30880      restingValue = state.restingValue,
30881      actionTypeId = state.actionTypeId,
30882      customEasingFn = state.customEasingFn;
30883  var parameters = action.payload.parameters;
30884  var velocity = Math.max(1 - smoothing, 0.01);
30885  var paramValue = parameters[parameterId];
30886
30887  if (paramValue == null) {
30888    velocity = 1;
30889    paramValue = restingValue;
30890  }
30891
30892  var nextPosition = Math.max(paramValue, 0) || 0;
30893  var positionDiff = optimizeFloat(nextPosition - lastPosition);
30894  var position = optimizeFloat(lastPosition + positionDiff * velocity);
30895  var keyframePosition = position * 100;
30896
30897  if (position === lastPosition && state.current) {
30898    return state;
30899  }
30900
30901  var fromActionItem;
30902  var toActionItem;
30903  var positionOffset;
30904  var positionRange;
30905
30906  for (var i = 0, length = actionGroups.length; i < length; i++) {
30907    var _actionGroups$i = actionGroups[i],
30908        keyframe = _actionGroups$i.keyframe,
30909        actionItems = _actionGroups$i.actionItems;
30910
30911    if (i === 0) {
30912      fromActionItem = actionItems[0];
30913    }
30914
30915    if (keyframePosition >= keyframe) {
30916      fromActionItem = actionItems[0];
30917      var nextGroup = actionGroups[i + 1];
30918      var hasNextItem = nextGroup && keyframePosition !== keyframe;
30919      toActionItem = hasNextItem ? nextGroup.actionItems[0] : null;
30920
30921      if (hasNextItem) {
30922        positionOffset = keyframe / 100;
30923        positionRange = (nextGroup.keyframe - keyframe) / 100;
30924      }
30925    }
30926  }
30927
30928  var current = {};
30929
30930  if (fromActionItem && !toActionItem) {
30931    for (var _i = 0, _length = destinationKeys.length; _i < _length; _i++) {
30932      var key = destinationKeys[_i];
30933      current[key] = getItemConfigByKey(actionTypeId, key, fromActionItem.config);
30934    }
30935  } else if (fromActionItem && toActionItem && positionOffset !== undefined && positionRange !== undefined) {
30936    var localPosition = (position - positionOffset) / positionRange;
30937    var easing = fromActionItem.config.easing;
30938    var eased = applyEasing(easing, localPosition, customEasingFn);
30939
30940    for (var _i2 = 0, _length2 = destinationKeys.length; _i2 < _length2; _i2++) {
30941      var _key = destinationKeys[_i2];
30942      var fromVal = getItemConfigByKey(actionTypeId, _key, fromActionItem.config);
30943      var toVal = getItemConfigByKey(actionTypeId, _key, toActionItem.config); // $FlowFixMe — toVal and fromVal could potentially be null, need to update type higher to determine number
30944
30945      var diff = toVal - fromVal; // $FlowFixMe
30946
30947      var value = diff * eased + fromVal;
30948      current[_key] = value;
30949    }
30950  }
30951
30952  return (0, _timm.merge)(state, {
30953    position: position,
30954    current: current
30955  });
30956};
30957
30958var timedInstance = function timedInstance(state, action) {
30959  var _state = state,
30960      active = _state.active,
30961      origin = _state.origin,
30962      start = _state.start,
30963      immediate = _state.immediate,
30964      renderType = _state.renderType,
30965      verbose = _state.verbose,
30966      actionItem = _state.actionItem,
30967      destination = _state.destination,
30968      destinationKeys = _state.destinationKeys,
30969      pluginDuration = _state.pluginDuration,
30970      instanceDelay = _state.instanceDelay,
30971      customEasingFn = _state.customEasingFn;
30972  var easing = actionItem.config.easing;
30973  var _actionItem$config = actionItem.config,
30974      duration = _actionItem$config.duration,
30975      delay = _actionItem$config.delay;
30976
30977  if (pluginDuration != null) {
30978    duration = pluginDuration;
30979  }
30980
30981  delay = instanceDelay != null ? instanceDelay : delay;
30982
30983  if (renderType === RENDER_GENERAL) {
30984    duration = 0;
30985  } else if (immediate) {
30986    duration = delay = 0;
30987  }
30988
30989  var now = action.payload.now;
30990
30991  if (active && origin) {
30992    var delta = now - (start + delay);
30993
30994    if (verbose) {
30995      var verboseDelta = now - start;
30996      var verboseDuration = duration + delay;
30997      var verbosePosition = optimizeFloat(Math.min(Math.max(0, verboseDelta / verboseDuration), 1));
30998      state = (0, _timm.set)(state, 'verboseTimeElapsed', verboseDuration * verbosePosition);
30999    }
31000
31001    if (delta < 0) {
31002      return state;
31003    }
31004
31005    var position = optimizeFloat(Math.min(Math.max(0, delta / duration), 1));
31006    var eased = applyEasing(easing, position, customEasingFn);
31007    var newProps = {};
31008    var current = null;
31009
31010    if (destinationKeys.length) {
31011      current = destinationKeys.reduce(function (result, key) {
31012        var destValue = destination[key];
31013        var originVal = parseFloat(origin[key]) || 0;
31014        var diff = parseFloat(destValue) - originVal;
31015        var value = diff * eased + originVal;
31016        result[key] = value;
31017        return result;
31018      }, {});
31019    }
31020
31021    newProps.current = current;
31022    newProps.position = position;
31023
31024    if (position === 1) {
31025      newProps.active = false;
31026      newProps.complete = true;
31027    }
31028
31029    return (0, _timm.merge)(state, newProps);
31030  }
31031
31032  return state;
31033};
31034
31035var ixInstances = function ixInstances() {
31036  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Object.freeze({});
31037  var action = arguments.length > 1 ? arguments[1] : undefined;
31038
31039  switch (action.type) {
31040    case IX2_RAW_DATA_IMPORTED:
31041      {
31042        return action.payload.ixInstances || Object.freeze({});
31043      }
31044
31045    case IX2_SESSION_STOPPED:
31046      {
31047        return Object.freeze({});
31048      }
31049
31050    case IX2_INSTANCE_ADDED:
31051      {
31052        var _action$payload = action.payload,
31053            instanceId = _action$payload.instanceId,
31054            elementId = _action$payload.elementId,
31055            actionItem = _action$payload.actionItem,
31056            eventId = _action$payload.eventId,
31057            eventTarget = _action$payload.eventTarget,
31058            eventStateKey = _action$payload.eventStateKey,
31059            actionListId = _action$payload.actionListId,
31060            groupIndex = _action$payload.groupIndex,
31061            isCarrier = _action$payload.isCarrier,
31062            origin = _action$payload.origin,
31063            destination = _action$payload.destination,
31064            immediate = _action$payload.immediate,
31065            verbose = _action$payload.verbose,
31066            continuous = _action$payload.continuous,
31067            parameterId = _action$payload.parameterId,
31068            actionGroups = _action$payload.actionGroups,
31069            smoothing = _action$payload.smoothing,
31070            restingValue = _action$payload.restingValue,
31071            pluginInstance = _action$payload.pluginInstance,
31072            pluginDuration = _action$payload.pluginDuration,
31073            instanceDelay = _action$payload.instanceDelay;
31074        var actionTypeId = actionItem.actionTypeId;
31075        var renderType = getRenderType(actionTypeId);
31076        var styleProp = getStyleProp(renderType, actionTypeId);
31077        var destinationKeys = Object.keys(destination).filter(function (key) {
31078          return destination[key] != null;
31079        });
31080        var easing = actionItem.config.easing;
31081        return (0, _timm.set)(state, instanceId, {
31082          id: instanceId,
31083          elementId: elementId,
31084          active: false,
31085          position: 0,
31086          start: 0,
31087          origin: origin,
31088          destination: destination,
31089          destinationKeys: destinationKeys,
31090          immediate: immediate,
31091          verbose: verbose,
31092          current: null,
31093          actionItem: actionItem,
31094          actionTypeId: actionTypeId,
31095          eventId: eventId,
31096          eventTarget: eventTarget,
31097          eventStateKey: eventStateKey,
31098          actionListId: actionListId,
31099          groupIndex: groupIndex,
31100          renderType: renderType,
31101          isCarrier: isCarrier,
31102          styleProp: styleProp,
31103          continuous: continuous,
31104          parameterId: parameterId,
31105          actionGroups: actionGroups,
31106          smoothing: smoothing,
31107          restingValue: restingValue,
31108          pluginInstance: pluginInstance,
31109          pluginDuration: pluginDuration,
31110          instanceDelay: instanceDelay,
31111          customEasingFn: Array.isArray(easing) && easing.length === 4 ? createBezierEasing(easing) : undefined
31112        });
31113      }
31114
31115    case IX2_INSTANCE_STARTED:
31116      {
31117        var _action$payload2 = action.payload,
31118            _instanceId = _action$payload2.instanceId,
31119            time = _action$payload2.time;
31120        return (0, _timm.mergeIn)(state, [_instanceId], {
31121          active: true,
31122          complete: false,
31123          start: time
31124        });
31125      }
31126
31127    case IX2_INSTANCE_REMOVED:
31128      {
31129        var _instanceId2 = action.payload.instanceId;
31130
31131        if (!state[_instanceId2]) {
31132          return state;
31133        }
31134
31135        var newState = {};
31136        var keys = Object.keys(state);
31137        var length = keys.length;
31138
31139        for (var i = 0; i < length; i++) {
31140          var key = keys[i];
31141
31142          if (key !== _instanceId2) {
31143            newState[key] = state[key];
31144          }
31145        }
31146
31147        return newState;
31148      }
31149
31150    case IX2_ANIMATION_FRAME_CHANGED:
31151      {
31152        var _newState = state;
31153
31154        var _keys = Object.keys(state);
31155
31156        var _length3 = _keys.length;
31157
31158        for (var _i3 = 0; _i3 < _length3; _i3++) {
31159          var _key2 = _keys[_i3];
31160          var instance = state[_key2];
31161          var reducer = instance.continuous ? continuousInstance : timedInstance;
31162          _newState = (0, _timm.set)(_newState, _key2, reducer(instance, action));
31163        }
31164
31165        return _newState;
31166      }
31167
31168    default:
31169      {
31170        return state;
31171      }
31172  }
31173};
31174
31175exports.ixInstances = ixInstances;
31176
31177/***/ }),
31178/* 331 */
31179/***/ (function(module, exports, __webpack_require__) {
31180
31181"use strict";
31182
31183
31184Object.defineProperty(exports, "__esModule", {
31185  value: true
31186});
31187exports.ixParameters = void 0;
31188
31189var _constants = __webpack_require__(6);
31190
31191var _constants$IX2EngineA = _constants.IX2EngineActionTypes,
31192    IX2_RAW_DATA_IMPORTED = _constants$IX2EngineA.IX2_RAW_DATA_IMPORTED,
31193    IX2_SESSION_STOPPED = _constants$IX2EngineA.IX2_SESSION_STOPPED,
31194    IX2_PARAMETER_CHANGED = _constants$IX2EngineA.IX2_PARAMETER_CHANGED; // prettier-ignore
31195
31196var ixParameters = function ixParameters() {
31197  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
31198    /*mutable flat state*/
31199  };
31200  var action = arguments.length > 1 ? arguments[1] : undefined;
31201
31202  switch (action.type) {
31203    case IX2_RAW_DATA_IMPORTED:
31204      {
31205        return action.payload.ixParameters || {
31206          /*mutable flat state*/
31207        };
31208      }
31209
31210    case IX2_SESSION_STOPPED:
31211      {
31212        return {
31213          /*mutable flat state*/
31214        };
31215      }
31216
31217    case IX2_PARAMETER_CHANGED:
31218      {
31219        var _action$payload = action.payload,
31220            key = _action$payload.key,
31221            value = _action$payload.value;
31222        state[key] = value;
31223        return state;
31224      }
31225
31226    default:
31227      {
31228        return state;
31229      }
31230  }
31231};
31232
31233exports.ixParameters = ixParameters;
31234
31235/***/ }),
31236/* 332 */
31237/***/ (function(module, exports) {
31238
31239function _objectWithoutPropertiesLoose(source, excluded) {
31240  if (source == null) return {};
31241  var target = {};
31242  var sourceKeys = Object.keys(source);
31243  var key, i;
31244
31245  for (i = 0; i < sourceKeys.length; i++) {
31246    key = sourceKeys[i];
31247    if (excluded.indexOf(key) >= 0) continue;
31248    target[key] = source[key];
31249  }
31250
31251  return target;
31252}
31253
31254module.exports = _objectWithoutPropertiesLoose;
31255
31256/***/ }),
31257/* 333 */
31258/***/ (function(module, exports, __webpack_require__) {
31259
31260var baseKeys = __webpack_require__(65),
31261    getTag = __webpack_require__(67),
31262    isArrayLike = __webpack_require__(25),
31263    isString = __webpack_require__(334),
31264    stringSize = __webpack_require__(335);
31265
31266/** `Object#toString` result references. */
31267var mapTag = '[object Map]',
31268    setTag = '[object Set]';
31269
31270/**
31271 * Gets the size of `collection` by returning its length for array-like
31272 * values or the number of own enumerable string keyed properties for objects.
31273 *
31274 * @static
31275 * @memberOf _
31276 * @since 0.1.0
31277 * @category Collection
31278 * @param {Array|Object|string} collection The collection to inspect.
31279 * @returns {number} Returns the collection size.
31280 * @example
31281 *
31282 * _.size([1, 2, 3]);
31283 * // => 3
31284 *
31285 * _.size({ 'a': 1, 'b': 2 });
31286 * // => 2
31287 *
31288 * _.size('pebbles');
31289 * // => 7
31290 */
31291function size(collection) {
31292  if (collection == null) {
31293    return 0;
31294  }
31295  if (isArrayLike(collection)) {
31296    return isString(collection) ? stringSize(collection) : collection.length;
31297  }
31298  var tag = getTag(collection);
31299  if (tag == mapTag || tag == setTag) {
31300    return collection.size;
31301  }
31302  return baseKeys(collection).length;
31303}
31304
31305module.exports = size;
31306
31307
31308/***/ }),
31309/* 334 */
31310/***/ (function(module, exports, __webpack_require__) {
31311
31312var baseGetTag = __webpack_require__(24),
31313    isArray = __webpack_require__(2),
31314    isObjectLike = __webpack_require__(20);
31315
31316/** `Object#toString` result references. */
31317var stringTag = '[object String]';
31318
31319/**
31320 * Checks if `value` is classified as a `String` primitive or object.
31321 *
31322 * @static
31323 * @since 0.1.0
31324 * @memberOf _
31325 * @category Lang
31326 * @param {*} value The value to check.
31327 * @returns {boolean} Returns `true` if `value` is a string, else `false`.
31328 * @example
31329 *
31330 * _.isString('abc');
31331 * // => true
31332 *
31333 * _.isString(1);
31334 * // => false
31335 */
31336function isString(value) {
31337  return typeof value == 'string' ||
31338    (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
31339}
31340
31341module.exports = isString;
31342
31343
31344/***/ }),
31345/* 335 */
31346/***/ (function(module, exports, __webpack_require__) {
31347
31348var asciiSize = __webpack_require__(336),
31349    hasUnicode = __webpack_require__(337),
31350    unicodeSize = __webpack_require__(338);
31351
31352/**
31353 * Gets the number of symbols in `string`.
31354 *
31355 * @private
31356 * @param {string} string The string to inspect.
31357 * @returns {number} Returns the string size.
31358 */
31359function stringSize(string) {
31360  return hasUnicode(string)
31361    ? unicodeSize(string)
31362    : asciiSize(string);
31363}
31364
31365module.exports = stringSize;
31366
31367
31368/***/ }),
31369/* 336 */
31370/***/ (function(module, exports, __webpack_require__) {
31371
31372var baseProperty = __webpack_require__(110);
31373
31374/**
31375 * Gets the size of an ASCII `string`.
31376 *
31377 * @private
31378 * @param {string} string The string inspect.
31379 * @returns {number} Returns the string size.
31380 */
31381var asciiSize = baseProperty('length');
31382
31383module.exports = asciiSize;
31384
31385
31386/***/ }),
31387/* 337 */
vendor: 2,921 bytes, lines 31388-31477
31388/***/ (function(module, exports) {
31389
31390/** Used to compose unicode character classes. */
31391var rsAstralRange = '\\ud800-\\udfff',
31392    rsComboMarksRange = '\\u0300-\\u036f',
31393    reComboHalfMarksRange = '\\ufe20-\\ufe2f',
31394    rsComboSymbolsRange = '\\u20d0-\\u20ff',
31395    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
31396    rsVarRange = '\\ufe0e\\ufe0f';
31397
31398/** Used to compose unicode capture groups. */
31399var rsZWJ = '\\u200d';
31400
31401/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
31402var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange  + rsComboRange + rsVarRange + ']');
31403
31404/**
31405 * Checks if `string` contains Unicode symbols.
31406 *
31407 * @private
31408 * @param {string} string The string to inspect.
31409 * @returns {boolean} Returns `true` if a symbol is found, else `false`.
31410 */
31411function hasUnicode(string) {
31412  return reHasUnicode.test(string);
31413}
31414
31415module.exports = hasUnicode;
31416
31417
31418/***/ }),
31419/* 338 */
31420/***/ (function(module, exports) {
31421
31422/** Used to compose unicode character classes. */
31423var rsAstralRange = '\\ud800-\\udfff',
31424    rsComboMarksRange = '\\u0300-\\u036f',
31425    reComboHalfMarksRange = '\\ufe20-\\ufe2f',
31426    rsComboSymbolsRange = '\\u20d0-\\u20ff',
31427    rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
31428    rsVarRange = '\\ufe0e\\ufe0f';
31429
31430/** Used to compose unicode capture groups. */
31431var rsAstral = '[' + rsAstralRange + ']',
31432    rsCombo = '[' + rsComboRange + ']',
31433    rsFitz = '\\ud83c[\\udffb-\\udfff]',
31434    rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
31435    rsNonAstral = '[^' + rsAstralRange + ']',
31436    rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
31437    rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
31438    rsZWJ = '\\u200d';
31439
31440/** Used to compose unicode regexes. */
31441var reOptMod = rsModifier + '?',
31442    rsOptVar = '[' + rsVarRange + ']?',
31443    rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
31444    rsSeq = rsOptVar + reOptMod + rsOptJoin,
31445    rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
31446
31447/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
31448var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
31449
31450/**
31451 * Gets the size of a Unicode `string`.
31452 *
31453 * @private
31454 * @param {string} string The string inspect.
31455 * @returns {number} Returns the string size.
31456 */
31457function unicodeSize(string) {
31458  var result = reUnicode.lastIndex = 0;
31459  while (reUnicode.test(string)) {
31460    ++result;
31461  }
31462  return result;
31463}
31464
31465module.exports = unicodeSize;
31466
31467
31468/***/ }),
31469/* 339 */
31470/***/ (function(module, exports, __webpack_require__) {
31471
31472var baseIteratee = __webpack_require__(18),
31473    negate = __webpack_require__(340),
31474    pickBy = __webpack_require__(341);
31475
31476/**
31477 * The opposite of `_.pickBy`;
31477 this method creates an object composed of
31478 * the own and inherited enumerable string keyed properties of `object` that
31479 * `predicate` doesn't return truthy for. The predicate is invoked with two
31480 * arguments: (value, key).
31481 *
31482 * @static
31483 * @memberOf _
31484 * @since 4.0.0
31485 * @category Object
31486 * @param {Object} object The source object.
31487 * @param {Function} [predicate=_.identity] The function invoked per property.
31488 * @returns {Object} Returns the new object.
31489 * @example
31490 *
31491 * var object = { 'a': 1, 'b': '2', 'c': 3 };
31492 *
31493 * _.omitBy(object, _.isNumber);
31494 * // => { 'b': '2' }
31495 */
31496function omitBy(object, predicate) {
31497  return pickBy(object, negate(baseIteratee(predicate)));
31498}
31499
31500module.exports = omitBy;
31501
31502
31503/***/ }),
31504/* 340 */
31505/***/ (function(module, exports) {
31506
31507/** Error message constants. */
31508var FUNC_ERROR_TEXT = 'Expected a function';
31509
31510/**
31511 * Creates a function that negates the result of the predicate `func`. The
31512 * `func` predicate is invoked with the `this` binding and arguments of the
31513 * created function.
31514 *
31515 * @static
31516 * @memberOf _
31517 * @since 3.0.0
31518 * @category Function
31519 * @param {Function} predicate The predicate to negate.
31520 * @returns {Function} Returns the new negated function.
31521 * @example
31522 *
31523 * function isEven(n) {
31524 *   return n % 2 == 0;
31525 * }
31526 *
31527 * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
31528 * // => [1, 3, 5]
31529 */
31530function negate(predicate) {
31531  if (typeof predicate != 'function') {
31532    throw new TypeError(FUNC_ERROR_TEXT);
31533  }
31534  return function() {
31535    var args = arguments;
31536    switch (args.length) {
31537      case 0: return !predicate.call(this);
31538      case 1: return !predicate.call(this, args[0]);
31539      case 2: return !predicate.call(this, args[0], args[1]);
31540      case 3: return !predicate.call(this, args[0], args[1], args[2]);
31541    }
31542    return !predicate.apply(this, args);
31543  };
31544}
31545
31546module.exports = negate;
31547
31548
31549/***/ }),
31550/* 341 */
31551/***/ (function(module, exports, __webpack_require__) {
31552
31553var arrayMap = __webpack_require__(109),
31554    baseIteratee = __webpack_require__(18),
31555    basePickBy = __webpack_require__(342),
31556    getAllKeysIn = __webpack_require__(345);
31557
31558/**
vendor: 5,445 bytes, lines 31559-31763
31559 * Creates an object composed of the `object` properties `predicate` returns
31560 * truthy for. The predicate is invoked with two arguments: (value, key).
31561 *
31562 * @static
31563 * @memberOf _
31564 * @since 4.0.0
31565 * @category Object
31566 * @param {Object} object The source object.
31567 * @param {Function} [predicate=_.identity] The function invoked per property.
31568 * @returns {Object} Returns the new object.
31569 * @example
31570 *
31571 * var object = { 'a': 1, 'b': '2', 'c': 3 };
31572 *
31573 * _.pickBy(object, _.isNumber);
31574 * // => { 'a': 1, 'c': 3 }
31575 */
31576function pickBy(object, predicate) {
31577  if (object == null) {
31578    return {};
31579  }
31580  var props = arrayMap(getAllKeysIn(object), function(prop) {
31581    return [prop];
31582  });
31583  predicate = baseIteratee(predicate);
31584  return basePickBy(object, props, function(value, path) {
31585    return predicate(value, path[0]);
31586  });
31587}
31588
31589module.exports = pickBy;
31590
31591
31592/***/ }),
31593/* 342 */
31594/***/ (function(module, exports, __webpack_require__) {
31595
31596var baseGet = __webpack_require__(69),
31597    baseSet = __webpack_require__(343),
31598    castPath = __webpack_require__(49);
31599
31600/**
31601 * The base implementation of  `_.pickBy` without support for iteratee shorthands.
31602 *
31603 * @private
31604 * @param {Object} object The source object.
31605 * @param {string[]} paths The property paths to pick.
31606 * @param {Function} predicate The function invoked per property.
31607 * @returns {Object} Returns the new object.
31608 */
31609function basePickBy(object, paths, predicate) {
31610  var index = -1,
31611      length = paths.length,
31612      result = {};
31613
31614  while (++index < length) {
31615    var path = paths[index],
31616        value = baseGet(object, path);
31617
31618    if (predicate(value, path)) {
31619      baseSet(result, castPath(path, object), value);
31620    }
31621  }
31622  return result;
31623}
31624
31625module.exports = basePickBy;
31626
31627
31628/***/ }),
31629/* 343 */
31630/***/ (function(module, exports, __webpack_require__) {
31631
31632var assignValue = __webpack_require__(344),
31633    castPath = __webpack_require__(49),
31634    isIndex = __webpack_require__(62),
31635    isObject = __webpack_require__(12),
31636    toKey = __webpack_require__(33);
31637
31638/**
31639 * The base implementation of `_.set`.
31640 *
31641 * @private
31642 * @param {Object} object The object to modify.
31643 * @param {Array|string} path The path of the property to set.
31644 * @param {*} value The value to set.
31645 * @param {Function} [customizer] The function to customize path creation.
31646 * @returns {Object} Returns `object`.
31647 */
31648function baseSet(object, path, value, customizer) {
31649  if (!isObject(object)) {
31650    return object;
31651  }
31652  path = castPath(path, object);
31653
31654  var index = -1,
31655      length = path.length,
31656      lastIndex = length - 1,
31657      nested = object;
31658
31659  while (nested != null && ++index < length) {
31660    var key = toKey(path[index]),
31661        newValue = value;
31662
31663    if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
31664      return object;
31665    }
31666
31667    if (index != lastIndex) {
31668      var objValue = nested[key];
31669      newValue = customizer ? customizer(objValue, key, nested) : undefined;
31670      if (newValue === undefined) {
31671        newValue = isObject(objValue)
31672          ? objValue
31673          : (isIndex(path[index + 1]) ? [] : {});
31674      }
31675    }
31676    assignValue(nested, key, newValue);
31677    nested = nested[key];
31678  }
31679  return object;
31680}
31681
31682module.exports = baseSet;
31683
31684
31685/***/ }),
31686/* 344 */
31687/***/ (function(module, exports, __webpack_require__) {
31688
31689var baseAssignValue = __webpack_require__(146),
31690    eq = __webpack_require__(57);
31691
31692/** Used for built-in method references. */
31693var objectProto = Object.prototype;
31694
31695/** Used to check objects for own properties. */
31696var hasOwnProperty = objectProto.hasOwnProperty;
31697
31698/**
31699 * Assigns `value` to `key` of `object` if the existing value is not equivalent
31700 * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
31701 * for equality comparisons.
31702 *
31703 * @private
31704 * @param {Object} object The object to modify.
31705 * @param {string} key The key of the property to assign.
31706 * @param {*} value The value to assign.
31707 */
31708function assignValue(object, key, value) {
31709  var objValue = object[key];
31710  if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
31711      (value === undefined && !(key in object))) {
31712    baseAssignValue(object, key, value);
31713  }
31714}
31715
31716module.exports = assignValue;
31717
31718
31719/***/ }),
31720/* 345 */
31721/***/ (function(module, exports, __webpack_require__) {
31722
31723var baseGetAllKeys = __webpack_require__(100),
31724    getSymbolsIn = __webpack_require__(346),
31725    keysIn = __webpack_require__(348);
31726
31727/**
31728 * Creates an array of own and inherited enumerable property names and
31729 * symbols of `object`.
31730 *
31731 * @private
31732 * @param {Object} object The object to query.
31733 * @returns {Array} Returns the array of property names and symbols.
31734 */
31735function getAllKeysIn(object) {
31736  return baseGetAllKeys(object, keysIn, getSymbolsIn);
31737}
31738
31739module.exports = getAllKeysIn;
31740
31741
31742/***/ }),
31743/* 346 */
31744/***/ (function(module, exports, __webpack_require__) {
31745
31746var arrayPush = __webpack_require__(60),
31747    getPrototype = __webpack_require__(347),
31748    getSymbols = __webpack_require__(101),
31749    stubArray = __webpack_require__(102);
31750
31751/* Built-in method references for those with the same name as other `lodash` methods. */
31752var nativeGetSymbols = Object.getOwnPropertySymbols;
31753
31754/**
31755 * Creates an array of the own and inherited enumerable symbols of `object`.
31756 *
31757 * @private
31758 * @param {Object} object The object to query.
31759 * @returns {Array} Returns the array of symbols.
31760 */
31761var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
31762  var result = [];
31763  while (object) {
vendor: 8,849 bytes, lines 31764-32122
31764    arrayPush(result, getSymbols(object));
31765    object = getPrototype(object);
31766  }
31767  return result;
31768};
31769
31770module.exports = getSymbolsIn;
31771
31772
31773/***/ }),
31774/* 347 */
31775/***/ (function(module, exports, __webpack_require__) {
31776
31777var overArg = __webpack_require__(105);
31778
31779/** Built-in value references. */
31780var getPrototype = overArg(Object.getPrototypeOf, Object);
31781
31782module.exports = getPrototype;
31783
31784
31785/***/ }),
31786/* 348 */
31787/***/ (function(module, exports, __webpack_require__) {
31788
31789var arrayLikeKeys = __webpack_require__(103),
31790    baseKeysIn = __webpack_require__(349),
31791    isArrayLike = __webpack_require__(25);
31792
31793/**
31794 * Creates an array of the own and inherited enumerable property names of `object`.
31795 *
31796 * **Note:** Non-object values are coerced to objects.
31797 *
31798 * @static
31799 * @memberOf _
31800 * @since 3.0.0
31801 * @category Object
31802 * @param {Object} object The object to query.
31803 * @returns {Array} Returns the array of property names.
31804 * @example
31805 *
31806 * function Foo() {
31807 *   this.a = 1;
31808 *   this.b = 2;
31809 * }
31810 *
31811 * Foo.prototype.c = 3;
31812 *
31813 * _.keysIn(new Foo);
31814 * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
31815 */
31816function keysIn(object) {
31817  return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
31818}
31819
31820module.exports = keysIn;
31821
31822
31823/***/ }),
31824/* 349 */
31825/***/ (function(module, exports, __webpack_require__) {
31826
31827var isObject = __webpack_require__(12),
31828    isPrototype = __webpack_require__(66),
31829    nativeKeysIn = __webpack_require__(350);
31830
31831/** Used for built-in method references. */
31832var objectProto = Object.prototype;
31833
31834/** Used to check objects for own properties. */
31835var hasOwnProperty = objectProto.hasOwnProperty;
31836
31837/**
31838 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
31839 *
31840 * @private
31841 * @param {Object} object The object to query.
31842 * @returns {Array} Returns the array of property names.
31843 */
31844function baseKeysIn(object) {
31845  if (!isObject(object)) {
31846    return nativeKeysIn(object);
31847  }
31848  var isProto = isPrototype(object),
31849      result = [];
31850
31851  for (var key in object) {
31852    if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
31853      result.push(key);
31854    }
31855  }
31856  return result;
31857}
31858
31859module.exports = baseKeysIn;
31860
31861
31862/***/ }),
31863/* 350 */
31864/***/ (function(module, exports) {
31865
31866/**
31867 * This function is like
31868 * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
31869 * except that it includes inherited enumerable properties.
31870 *
31871 * @private
31872 * @param {Object} object The object to query.
31873 * @returns {Array} Returns the array of property names.
31874 */
31875function nativeKeysIn(object) {
31876  var result = [];
31877  if (object != null) {
31878    for (var key in Object(object)) {
31879      result.push(key);
31880    }
31881  }
31882  return result;
31883}
31884
31885module.exports = nativeKeysIn;
31886
31887
31888/***/ }),
31889/* 351 */
31890/***/ (function(module, exports, __webpack_require__) {
31891
31892var baseKeys = __webpack_require__(65),
31893    getTag = __webpack_require__(67),
31894    isArguments = __webpack_require__(48),
31895    isArray = __webpack_require__(2),
31896    isArrayLike = __webpack_require__(25),
31897    isBuffer = __webpack_require__(61),
31898    isPrototype = __webpack_require__(66),
31899    isTypedArray = __webpack_require__(63);
31900
31901/** `Object#toString` result references. */
31902var mapTag = '[object Map]',
31903    setTag = '[object Set]';
31904
31905/** Used for built-in method references. */
31906var objectProto = Object.prototype;
31907
31908/** Used to check objects for own properties. */
31909var hasOwnProperty = objectProto.hasOwnProperty;
31910
31911/**
31912 * Checks if `value` is an empty object, collection, map, or set.
31913 *
31914 * Objects are considered empty if they have no own enumerable string keyed
31915 * properties.
31916 *
31917 * Array-like values such as `arguments` objects, arrays, buffers, strings, or
31918 * jQuery-like collections are considered empty if they have a `length` of `0`.
31919 * Similarly, maps and sets are considered empty if they have a `size` of `0`.
31920 *
31921 * @static
31922 * @memberOf _
31923 * @since 0.1.0
31924 * @category Lang
31925 * @param {*} value The value to check.
31926 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
31927 * @example
31928 *
31929 * _.isEmpty(null);
31930 * // => true
31931 *
31932 * _.isEmpty(true);
31933 * // => true
31934 *
31935 * _.isEmpty(1);
31936 * // => true
31937 *
31938 * _.isEmpty([1, 2, 3]);
31939 * // => false
31940 *
31941 * _.isEmpty({ 'a': 1 });
31942 * // => false
31943 */
31944function isEmpty(value) {
31945  if (value == null) {
31946    return true;
31947  }
31948  if (isArrayLike(value) &&
31949      (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
31950        isBuffer(value) || isTypedArray(value) || isArguments(value))) {
31951    return !value.length;
31952  }
31953  var tag = getTag(value);
31954  if (tag == mapTag || tag == setTag) {
31955    return !value.size;
31956  }
31957  if (isPrototype(value)) {
31958    return !baseKeys(value).length;
31959  }
31960  for (var key in value) {
31961    if (hasOwnProperty.call(value, key)) {
31962      return false;
31963    }
31964  }
31965  return true;
31966}
31967
31968module.exports = isEmpty;
31969
31970
31971/***/ }),
31972/* 352 */
31973/***/ (function(module, exports, __webpack_require__) {
31974
31975var baseAssignValue = __webpack_require__(146),
31976    baseForOwn = __webpack_require__(143),
31977    baseIteratee = __webpack_require__(18);
31978
31979/**
31980 * Creates an object with the same keys as `object` and values generated
31981 * by running each own enumerable string keyed property of `object` thru
31982 * `iteratee`. The iteratee is invoked with three arguments:
31983 * (value, key, object).
31984 *
31985 * @static
31986 * @memberOf _
31987 * @since 2.4.0
31988 * @category Object
31989 * @param {Object} object The object to iterate over.
31990 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
31991 * @returns {Object} Returns the new mapped object.
31992 * @see _.mapKeys
31993 * @example
31994 *
31995 * var users = {
31996 *   'fred':    { 'user': 'fred',    'age': 40 },
31997 *   'pebbles': { 'user': 'pebbles', 'age': 1 }
31998 * };
31999 *
32000 * _.mapValues(users, function(o) { return o.age; });
32001 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
32002 *
32003 * // The `_.property` iteratee shorthand.
32004 * _.mapValues(users, 'age');
32005 * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
32006 */
32007function mapValues(object, iteratee) {
32008  var result = {};
32009  iteratee = baseIteratee(iteratee, 3);
32010
32011  baseForOwn(object, function(value, key, object) {
32012    baseAssignValue(result, key, iteratee(value, key, object));
32013  });
32014  return result;
32015}
32016
32017module.exports = mapValues;
32018
32019
32020/***/ }),
32021/* 353 */
32022/***/ (function(module, exports, __webpack_require__) {
32023
32024var arrayEach = __webpack_require__(354),
32025    baseEach = __webpack_require__(142),
32026    castFunction = __webpack_require__(355),
32027    isArray = __webpack_require__(2);
32028
32029/**
32030 * Iterates over elements of `collection` and invokes `iteratee` for each element.
32031 * The iteratee is invoked with three arguments: (value, index|key, collection).
32032 * Iteratee functions may exit iteration early by explicitly returning `false`.
32033 *
32034 * **Note:** As with other "Collections" methods, objects with a "length"
32035 * property are iterated like arrays. To avoid this behavior use `_.forIn`
32036 * or `_.forOwn` for object iteration.
32037 *
32038 * @static
32039 * @memberOf _
32040 * @since 0.1.0
32041 * @alias each
32042 * @category Collection
32043 * @param {Array|Object} collection The collection to iterate over.
32044 * @param {Function} [iteratee=_.identity] The function invoked per iteration.
32045 * @returns {Array|Object} Returns `collection`.
32046 * @see _.forEachRight
32047 * @example
32048 *
32049 * _.forEach([1, 2], function(value) {
32050 *   console.log(value);
32051 * });
32052 * // => Logs `1` then `2`.
32053 *
32054 * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
32055 *   console.log(key);
32056 * });
32057 * // => Logs 'a' then 'b' (iteration order is not guaranteed).
32058 */
32059function forEach(collection, iteratee) {
32060  var func = isArray(collection) ? arrayEach : baseEach;
32061  return func(collection, castFunction(iteratee));
32062}
32063
32064module.exports = forEach;
32065
32066
32067/***/ }),
32068/* 354 */
32069/***/ (function(module, exports) {
32070
32071/**
32072 * A specialized version of `_.forEach` for arrays without support for
32073 * iteratee shorthands.
32074 *
32075 * @private
32076 * @param {Array} [array] The array to iterate over.
32077 * @param {Function} iteratee The function invoked per iteration.
32078 * @returns {Array} Returns `array`.
32079 */
32080function arrayEach(array, iteratee) {
32081  var index = -1,
32082      length = array == null ? 0 : array.length;
32083
32084  while (++index < length) {
32085    if (iteratee(array[index], index, array) === false) {
32086      break;
32087    }
32088  }
32089  return array;
32090}
32091
32092module.exports = arrayEach;
32093
32094
32095/***/ }),
32096/* 355 */
32097/***/ (function(module, exports, __webpack_require__) {
32098
32099var identity = __webpack_require__(71);
32100
32101/**
32102 * Casts `value` to `identity` if it's not a function.
32103 *
32104 * @private
32105 * @param {*} value The value to inspect.
32106 * @returns {Function} Returns cast function.
32107 */
32108function castFunction(value) {
32109  return typeof value == 'function' ? value : identity;
32110}
32111
32112module.exports = castFunction;
32113
32114
32115/***/ }),
32116/* 356 */
32117/***/ (function(module, exports, __webpack_require__) {
32118
32119var debounce = __webpack_require__(357),
32120    isObject = __webpack_require__(12);
32121
32122/** Error message constants. */
vendor: 9,978 bytes, lines 32123-32437
32123var FUNC_ERROR_TEXT = 'Expected a function';
32124
32125/**
32126 * Creates a throttled function that only invokes `func` at most once per
32127 * every `wait` milliseconds. The throttled function comes with a `cancel`
32128 * method to cancel delayed `func` invocations and a `flush` method to
32129 * immediately invoke them. Provide `options` to indicate whether `func`
32130 * should be invoked on the leading and/or trailing edge of the `wait`
32131 * timeout. The `func` is invoked with the last arguments provided to the
32132 * throttled function. Subsequent calls to the throttled function return the
32133 * result of the last `func` invocation.
32134 *
32135 * **Note:** If `leading` and `trailing` options are `true`, `func` is
32136 * invoked on the trailing edge of the timeout only if the throttled function
32137 * is invoked more than once during the `wait` timeout.
32138 *
32139 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
32140 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
32141 *
32142 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
32143 * for details over the differences between `_.throttle` and `_.debounce`.
32144 *
32145 * @static
32146 * @memberOf _
32147 * @since 0.1.0
32148 * @category Function
32149 * @param {Function} func The function to throttle.
32150 * @param {number} [wait=0] The number of milliseconds to throttle invocations to.
32151 * @param {Object} [options={}] The options object.
32152 * @param {boolean} [options.leading=true]
32153 *  Specify invoking on the leading edge of the timeout.
32154 * @param {boolean} [options.trailing=true]
32155 *  Specify invoking on the trailing edge of the timeout.
32156 * @returns {Function} Returns the new throttled function.
32157 * @example
32158 *
32159 * // Avoid excessively updating the position while scrolling.
32160 * jQuery(window).on('scroll', _.throttle(updatePosition, 100));
32161 *
32162 * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
32163 * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
32164 * jQuery(element).on('click', throttled);
32165 *
32166 * // Cancel the trailing throttled invocation.
32167 * jQuery(window).on('popstate', throttled.cancel);
32168 */
32169function throttle(func, wait, options) {
32170  var leading = true,
32171      trailing = true;
32172
32173  if (typeof func != 'function') {
32174    throw new TypeError(FUNC_ERROR_TEXT);
32175  }
32176  if (isObject(options)) {
32177    leading = 'leading' in options ? !!options.leading : leading;
32178    trailing = 'trailing' in options ? !!options.trailing : trailing;
32179  }
32180  return debounce(func, wait, {
32181    'leading': leading,
32182    'maxWait': wait,
32183    'trailing': trailing
32184  });
32185}
32186
32187module.exports = throttle;
32188
32189
32190/***/ }),
32191/* 357 */
32192/***/ (function(module, exports, __webpack_require__) {
32193
32194var isObject = __webpack_require__(12),
32195    now = __webpack_require__(358),
32196    toNumber = __webpack_require__(72);
32197
32198/** Error message constants. */
32199var FUNC_ERROR_TEXT = 'Expected a function';
32200
32201/* Built-in method references for those with the same name as other `lodash` methods. */
32202var nativeMax = Math.max,
32203    nativeMin = Math.min;
32204
32205/**
32206 * Creates a debounced function that delays invoking `func` until after `wait`
32207 * milliseconds have elapsed since the last time the debounced function was
32208 * invoked. The debounced function comes with a `cancel` method to cancel
32209 * delayed `func` invocations and a `flush` method to immediately invoke them.
32210 * Provide `options` to indicate whether `func` should be invoked on the
32211 * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
32212 * with the last arguments provided to the debounced function. Subsequent
32213 * calls to the debounced function return the result of the last `func`
32214 * invocation.
32215 *
32216 * **Note:** If `leading` and `trailing` options are `true`, `func` is
32217 * invoked on the trailing edge of the timeout only if the debounced function
32218 * is invoked more than once during the `wait` timeout.
32219 *
32220 * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
32221 * until to the next tick, similar to `setTimeout` with a timeout of `0`.
32222 *
32223 * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
32224 * for details over the differences between `_.debounce` and `_.throttle`.
32225 *
32226 * @static
32227 * @memberOf _
32228 * @since 0.1.0
32229 * @category Function
32230 * @param {Function} func The function to debounce.
32231 * @param {number} [wait=0] The number of milliseconds to delay.
32232 * @param {Object} [options={}] The options object.
32233 * @param {boolean} [options.leading=false]
32234 *  Specify invoking on the leading edge of the timeout.
32235 * @param {number} [options.maxWait]
32236 *  The maximum time `func` is allowed to be delayed before it's invoked.
32237 * @param {boolean} [options.trailing=true]
32238 *  Specify invoking on the trailing edge of the timeout.
32239 * @returns {Function} Returns the new debounced function.
32240 * @example
32241 *
32242 * // Avoid costly calculations while the window size is in flux.
32243 * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
32244 *
32245 * // Invoke `sendMail` when clicked, debouncing subsequent calls.
32246 * jQuery(element).on('click', _.debounce(sendMail, 300, {
32247 *   'leading': true,
32248 *   'trailing': false
32249 * }));
32250 *
32251 * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
32252 * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
32253 * var source = new EventSource('/stream');
32254 * jQuery(source).on('message', debounced);
32255 *
32256 * // Cancel the trailing debounced invocation.
32257 * jQuery(window).on('popstate', debounced.cancel);
32258 */
32259function debounce(func, wait, options) {
32260  var lastArgs,
32261      lastThis,
32262      maxWait,
32263      result,
32264      timerId,
32265      lastCallTime,
32266      lastInvokeTime = 0,
32267      leading = false,
32268      maxing = false,
32269      trailing = true;
32270
32271  if (typeof func != 'function') {
32272    throw new TypeError(FUNC_ERROR_TEXT);
32273  }
32274  wait = toNumber(wait) || 0;
32275  if (isObject(options)) {
32276    leading = !!options.leading;
32277    maxing = 'maxWait' in options;
32278    maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
32279    trailing = 'trailing' in options ? !!options.trailing : trailing;
32280  }
32281
32282  function invokeFunc(time) {
32283    var args = lastArgs,
32284        thisArg = lastThis;
32285
32286    lastArgs = lastThis = undefined;
32287    lastInvokeTime = time;
32288    result = func.apply(thisArg, args);
32289    return result;
32290  }
32291
32292  function leadingEdge(time) {
32293    // Reset any `maxWait` timer.
32294    lastInvokeTime = time;
32295    // Start the timer for the trailing edge.
32296    timerId = setTimeout(timerExpired, wait);
32297    // Invoke the leading edge.
32298    return leading ? invokeFunc(time) : result;
32299  }
32300
32301  function remainingWait(time) {
32302    var timeSinceLastCall = time - lastCallTime,
32303        timeSinceLastInvoke = time - lastInvokeTime,
32304        timeWaiting = wait - timeSinceLastCall;
32305
32306    return maxing
32307      ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
32308      : timeWaiting;
32309  }
32310
32311  function shouldInvoke(time) {
32312    var timeSinceLastCall = time - lastCallTime,
32313        timeSinceLastInvoke = time - lastInvokeTime;
32314
32315    // Either this is the first call, activity has stopped and we're at the
32316    // trailing edge, the system time has gone backwards and we're treating
32317    // it as the trailing edge, or we've hit the `maxWait` limit.
32318    return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
32319      (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
32320  }
32321
32322  function timerExpired() {
32323    var time = now();
32324    if (shouldInvoke(time)) {
32325      return trailingEdge(time);
32326    }
32327    // Restart the timer.
32328    timerId = setTimeout(timerExpired, remainingWait(time));
32329  }
32330
32331  function trailingEdge(time) {
32332    timerId = undefined;
32333
32334    // Only invoke if we have `lastArgs` which means `func` has been
32335    // debounced at least once.
32336    if (trailing && lastArgs) {
32337      return invokeFunc(time);
32338    }
32339    lastArgs = lastThis = undefined;
32340    return result;
32341  }
32342
32343  function cancel() {
32344    if (timerId !== undefined) {
32345      clearTimeout(timerId);
32346    }
32347    lastInvokeTime = 0;
32348    lastArgs = lastCallTime = lastThis = timerId = undefined;
32349  }
32350
32351  function flush() {
32352    return timerId === undefined ? result : trailingEdge(now());
32353  }
32354
32355  function debounced() {
32356    var time = now(),
32357        isInvoking = shouldInvoke(time);
32358
32359    lastArgs = arguments;
32360    lastThis = this;
32361    lastCallTime = time;
32362
32363    if (isInvoking) {
32364      if (timerId === undefined) {
32365        return leadingEdge(lastCallTime);
32366      }
32367      if (maxing) {
32368        // Handle invocations in a tight loop.
32369        clearTimeout(timerId);
32370        timerId = setTimeout(timerExpired, wait);
32371        return invokeFunc(lastCallTime);
32372      }
32373    }
32374    if (timerId === undefined) {
32375      timerId = setTimeout(timerExpired, wait);
32376    }
32377    return result;
32378  }
32379  debounced.cancel = cancel;
32380  debounced.flush = flush;
32381  return debounced;
32382}
32383
32384module.exports = debounce;
32385
32386
32387/***/ }),
32388/* 358 */
32389/***/ (function(module, exports, __webpack_require__) {
32390
32391var root = __webpack_require__(10);
32392
32393/**
32394 * Gets the timestamp of the number of milliseconds that have elapsed since
32395 * the Unix epoch (1 January 1970 00:00:00 UTC).
32396 *
32397 * @static
32398 * @memberOf _
32399 * @since 2.4.0
32400 * @category Date
32401 * @returns {number} Returns the timestamp.
32402 * @example
32403 *
32404 * _.defer(function(stamp) {
32405 *   console.log(_.now() - stamp);
32406 * }, _.now());
32407 * // => Logs the number of milliseconds it took for the deferred invocation.
32408 */
32409var now = function() {
32410  return root.Date.now();
32411};
32412
32413module.exports = now;
32414
32415
32416/***/ }),
32417/* 359 */
32418/***/ (function(module, exports, __webpack_require__) {
32419
32420"use strict";
32421
32422
32423var _interopRequireDefault = __webpack_require__(1);
32424
32425var _typeof2 = _interopRequireDefault(__webpack_require__(41));
32426
32427Object.defineProperty(exports, "__esModule", {
32428  value: true
32429});
32430exports.setStyle = setStyle;
32431exports.getStyle = getStyle;
32432exports.getProperty = getProperty;
32433exports.matchSelector = matchSelector;
32434exports.getQuerySelector = getQuerySelector;
32435exports.getValidDocument = getValidDocument;
32436exports.queryDocument = queryDocument;
32437exports.elementContains = elementContains;
32438exports.isSiblingNode = isSiblingNode;
32439exports.getChildElements = getChildElements;
32440exports.getSiblingElements = getSiblingElements;
32441exports.getRefType = getRefType;
32442exports.getClosestElement = void 0;
32443
32444var _shared = __webpack_require__(29);
32445
32446var _constants = __webpack_require__(6);
32447/* eslint-env browser */
32448
32449
32450var ELEMENT_MATCHES = _shared.IX2BrowserSupport.ELEMENT_MATCHES;
32451var _constants$IX2EngineC = _constants.IX2EngineConstants,
32452    IX2_ID_DELIMITER = _constants$IX2EngineC.IX2_ID_DELIMITER,
32453    HTML_ELEMENT = _constants$IX2EngineC.HTML_ELEMENT,
32454    PLAIN_OBJECT = _constants$IX2EngineC.PLAIN_OBJECT,
32455    WF_PAGE = _constants$IX2EngineC.WF_PAGE;
32456
32457function setStyle(element, prop, value) {
32458  // $FlowIgnore — flow complains that prop should be a number. Will need to update upstream
32459  element.style[prop] = value;
32460}
32461
32462function getStyle(element, prop) {
32463  // $FlowIgnore — flow complains that prop should be a number. Will need to update upstream
32464  return element.style[prop];
32465}
32466
32467function getProperty(element, prop) {
32468  // $FlowIgnore — flow complains that prop should be a number. Will need to update upstream
32469  return element[prop];
32470}
32471
32472function matchSelector(selector) {
32473  // $FlowIgnore — ELEMENT_MATCHES is the name of the method on the element's prototype depending on browser
32474  return function (element) {
32475    return element[ELEMENT_MATCHES](selector);
32476  };
32477}
32478
32479function getQuerySelector(_ref) {
32480  var id = _ref.id,
32481      selector = _ref.selector;
32482
32483  if (id) {
32484    var nodeId = id;
32485
32486    if (id.indexOf(IX2_ID_DELIMITER) !== -1) {
32487      var pair = id.split(IX2_ID_DELIMITER);
32488      var pageId = pair[0];
32489      nodeId = pair[1]; // Short circuit query if we're on the wrong page
32490      // $FlowIgnore — if documentElement is null crash
32491
32492      if (pageId !== document.documentElement.getAttribute(WF_PAGE)) {
32493        return null;
32494      }
32495    }
32496
32497    return "[data-w-id=\"".concat(nodeId, "\"], [data-w-id^=\"").concat(nodeId, "_instance\"]");
32498  }
32499
32500  return selector;
32501}
32502
32503function getValidDocument(pageId) {
32504  if (pageId == null || // $FlowIgnore — if documentElement is null crash
32505  pageId === document.documentElement.getAttribute(WF_PAGE)) {
32506    return document;
32507  }
32508
32509  return null;
32510}
32511
32512function queryDocument(baseSelector, descendantSelector) {
32513  return Array.prototype.slice.call(document.querySelectorAll(descendantSelector ? baseSelector + ' ' + descendantSelector : baseSelector));
32514}
32515
32516function elementContains(parent, child) {
32517  return parent.contains(child);
32518}
32519
32520function isSiblingNode(a, b) {
32521  return a !== b && a.parentNode === b.parentNode;
32522}
32523
32524function getChildElements(sourceElements) {
32525  var childElements = [];
32526
32527  for (var i = 0, _ref2 = sourceElements || [], length = _ref2.length; i < length; i++) {
32528    var children = sourceElements[i].children;
32529    var childCount = children.length;
32530
32531    if (!childCount) {
32532      continue;
32533    }
32534
32535    for (var j = 0; j < childCount; j++) {
32536      childElements.push(children[j]);
32537    }
32538  }
32539
32540  return childElements;
32541} // $FlowFixMe
32542
32543
32544function getSiblingElements() {
32545  var sourceElements = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
32546  var elements = [];
32547  var parentCache = [];
32548
32549  for (var i = 0, length = sourceElements.length; i < length; i++) {
32550    var parentNode = sourceElements[i].parentNode;
32551
32552    if (!parentNode || !parentNode.children || !parentNode.children.length) {
32553      continue;
32554    }
32555
32556    if (parentCache.indexOf(parentNode) !== -1) {
32557      continue;
32558    }
32559
32560    parentCache.push(parentNode);
32561    var el = parentNode.firstElementChild;
32562
32563    while (el != null) {
32564      if (sourceElements.indexOf(el) === -1) {
32565        elements.push(el);
32566      }
32567
32568      el = el.nextElementSibling;
32569    }
32570  }
32571
32572  return elements;
32573}
32574
32575var getClosestElement = Element.prototype.closest ? function (element, selector) {
32576  // $FlowIgnore — ELEMENT_MATCHES is the name of the method on the element's prototype depending on browser
32577  if (!document.documentElement.contains(element)) {
32578    return null;
32579  }
32580
32581  return element.closest(selector);
32582} : function (element, selector) {
32583  // $FlowIgnore — if documentElement is null crash
32584  if (!document.documentElement.contains(element)) {
32585    return null;
32586  }
32587
32588  var el = element;
32589
32590  do {
32591    // $FlowIgnore — if documentElement is null crash
32592    if (el[ELEMENT_MATCHES] && el[ELEMENT_MATCHES](selector)) {
32593      return el;
32594    }
32595
32596    el = el.parentNode;
32597  } while (el != null);
32598
32599  return null;
32600};
32601exports.getClosestElement = getClosestElement;
32602
32603function getRefType(ref) {
32604  if (ref != null && (0, _typeof2["default"])(ref) == 'object') {
32605    return ref instanceof Element ? HTML_ELEMENT : PLAIN_OBJECT;
32606  }
32607
32608  return null;
32609}
32610
32611/***/ }),
32612/* 360 */
32613/***/ (function(module, exports, __webpack_require__) {
32614
32615"use strict";
32616
32617
32618var _interopRequireDefault2 = __webpack_require__(1);
32619
32620var _defineProperty2 = _interopRequireDefault2(__webpack_require__(31));
32621
32622var _typeof2 = _interopRequireDefault2(__webpack_require__(41));
32623
32624var _default2;
32625
32626var _interopRequireDefault = __webpack_require__(1);
32627
32628Object.defineProperty(exports, "__esModule", {
32629  value: true
32630});
32631exports["default"] = void 0;
32632
32633var _extends2 = _interopRequireDefault(__webpack_require__(30));
32634
32635var _flow = _interopRequireDefault(__webpack_require__(361));
32636
32637var _get = _interopRequireDefault(__webpack_require__(68));
32638
32639var _clamp = _interopRequireDefault(__webpack_require__(380));
32640
32641var _constants = __webpack_require__(6);
32642
32643var _IX2VanillaEngine = __webpack_require__(145);
32644
32645var _IX2EngineActions = __webpack_require__(87);
32646
32647var _shared = __webpack_require__(29);
32648/* eslint-env browser */
32649
32650
32651var _constants$EventTypeC = _constants.EventTypeConsts,
32652    MOUSE_CLICK = _constants$EventTypeC.MOUSE_CLICK,
32653    MOUSE_SECOND_CLICK = _constants$EventTypeC.MOUSE_SECOND_CLICK,
32654    MOUSE_DOWN = _constants$EventTypeC.MOUSE_DOWN,
32655    MOUSE_UP = _constants$EventTypeC.MOUSE_UP,
32656    MOUSE_OVER = _constants$EventTypeC.MOUSE_OVER,
32657    MOUSE_OUT = _constants$EventTypeC.MOUSE_OUT,
32658    DROPDOWN_CLOSE = _constants$EventTypeC.DROPDOWN_CLOSE,
32659    DROPDOWN_OPEN = _constants$EventTypeC.DROPDOWN_OPEN,
32660    SLIDER_ACTIVE = _constants$EventTypeC.SLIDER_ACTIVE,
32661    SLIDER_INACTIVE = _constants$EventTypeC.SLIDER_INACTIVE,
32662    TAB_ACTIVE = _constants$EventTypeC.TAB_ACTIVE,
32663    TAB_INACTIVE = _constants$EventTypeC.TAB_INACTIVE,
32664    NAVBAR_CLOSE = _constants$EventTypeC.NAVBAR_CLOSE,
32665    NAVBAR_OPEN = _constants$EventTypeC.NAVBAR_OPEN,
32666    MOUSE_MOVE = _constants$EventTypeC.MOUSE_MOVE,
32667    PAGE_SCROLL_DOWN = _constants$EventTypeC.PAGE_SCROLL_DOWN,
32668    SCROLL_INTO_VIEW = _constants$EventTypeC.SCROLL_INTO_VIEW,
32669    SCROLL_OUT_OF_VIEW = _constants$EventTypeC.SCROLL_OUT_OF_VIEW,
32670    PAGE_SCROLL_UP = _constants$EventTypeC.PAGE_SCROLL_UP,
32671    SCROLLING_IN_VIEW = _constants$EventTypeC.SCROLLING_IN_VIEW,
32672    PAGE_FINISH = _constants$EventTypeC.PAGE_FINISH,
32673    ECOMMERCE_CART_CLOSE = _constants$EventTypeC.ECOMMERCE_CART_CLOSE,
32674    ECOMMERCE_CART_OPEN = _constants$EventTypeC.ECOMMERCE_CART_OPEN,
32675    PAGE_START = _constants$EventTypeC.PAGE_START,
32676    PAGE_SCROLL = _constants$EventTypeC.PAGE_SCROLL;
32677var COMPONENT_ACTIVE = 'COMPONENT_ACTIVE';
32678var COMPONENT_INACTIVE = 'COMPONENT_INACTIVE';
32679var COLON_DELIMITER = _constants.IX2EngineConstants.COLON_DELIMITER;
32680var getNamespacedParameterId = _shared.IX2VanillaUtils.getNamespacedParameterId;
32681
32682var composableFilter = function composableFilter(predicate) {
32683  return function (options) {
32684    if ((0, _typeof2["default"])(options) === 'object' && predicate(options)) {
32685      return true;
32686    }
32687
32688    return options;
32689  };
32690};
32691
32692var isElement = composableFilter(function (_ref) {
32693  var element = _ref.element,
32694      nativeEvent = _ref.nativeEvent;
32695  return element === nativeEvent.target;
32696});
32697var containsElement = composableFilter(function (_ref2) {
32698  var element = _ref2.element,
32699      nativeEvent = _ref2.nativeEvent;
32700  return element.contains(nativeEvent.target);
32701});
32702var isOrContainsElement = (0, _flow["default"])([isElement, containsElement]);
32703
32704var getAutoStopEvent = function getAutoStopEvent(store, autoStopEventId) {
32705  if (autoStopEventId) {
32706    var _store$getState = store.getState(),
32707        ixData = _store$getState.ixData;
32708
32709    var events = ixData.events;
32710    var eventToStop = events[autoStopEventId];
32711
32712    if (eventToStop && !AUTO_STOP_DISABLED_EVENTS[eventToStop.eventTypeId]) {
32713      return eventToStop;
32714    }
32715  }
32716
32717  return null;
32718};
32719
32720var hasAutoStopEvent = function hasAutoStopEvent(_ref3) {
32721  var store = _ref3.store,
32722      event = _ref3.event;
32723  var eventAction = event.action;
32724  var autoStopEventId = eventAction.config.autoStopEventId;
32725  return Boolean(getAutoStopEvent(store, autoStopEventId));
32726};
32727
32728var actionGroupCreator = function actionGroupCreator(_ref4, state) {
32729  var store = _ref4.store,
32730      event = _ref4.event,
32731      element = _ref4.element,
32732      eventStateKey = _ref4.eventStateKey;
32733  var eventAction = event.action,
32734      eventId = event.id;
32735  var _eventAction$config = eventAction.config,
32736      actionListId = _eventAction$config.actionListId,
32737      autoStopEventId = _eventAction$config.autoStopEventId;
32738  var eventToStop = getAutoStopEvent(store, autoStopEventId);
32739
32740  if (eventToStop) {
32741    (0, _IX2VanillaEngine.stopActionGroup)({
32742      store: store,
32743      eventId: autoStopEventId,
32744      eventTarget: element,
32745      eventStateKey: autoStopEventId + COLON_DELIMITER + eventStateKey.split(COLON_DELIMITER)[1],
32746      actionListId: (0, _get["default"])(eventToStop, 'action.config.actionListId')
32747    });
32748  }
32749
32750  (0, _IX2VanillaEngine.stopActionGroup)({
32751    store: store,
32752    eventId: eventId,
32753    eventTarget: element,
32754    eventStateKey: eventStateKey,
32755    actionListId: actionListId
32756  });
32757  (0, _IX2VanillaEngine.startActionGroup)({
32758    store: store,
32759    eventId: eventId,
32760    eventTarget: element,
32761    eventStateKey: eventStateKey,
32762    actionListId: actionListId
32763  });
32764  return state;
32765}; // $FlowFixMe
32766
32767
32768var withFilter = function withFilter(filter, handler) {
32769  return function (options, state) {
32770    return (// $FlowFixMe
32771      filter(options, state) === true ? handler(options, state) : state
32772    );
32773  };
32774};
32775
32776var baseActionGroupOptions = {
32777  handler: withFilter(isOrContainsElement, actionGroupCreator)
32778};
32779var baseActivityActionGroupOptions = (0, _extends2["default"])({}, baseActionGroupOptions, {
32780  types: [COMPONENT_ACTIVE, COMPONENT_INACTIVE].join(' ')
32781});
32782var SCROLL_EVENT_TYPES = [{
32783  target: window,
32784  types: 'resize orientationchange',
32785  throttle: true
32786}, {
32787  target: document,
32788  types: 'scroll wheel readystatechange IX2_PAGE_UPDATE',
32789  throttle: true
32790}];
32791var MOUSE_OVER_OUT_TYPES = 'mouseover mouseout';
32792var baseScrollActionGroupOptions = {
32793  types: SCROLL_EVENT_TYPES
32794};
32795var AUTO_STOP_DISABLED_EVENTS = {
32796  PAGE_START: PAGE_START,
32797  PAGE_FINISH: PAGE_FINISH
32798};
32799
32800var getDocumentState = function () {
32801  var supportOffset = window.pageXOffset !== undefined;
32802  var isCSS1Compat = document.compatMode === 'CSS1Compat';
32803  var rootElement = isCSS1Compat ? document.documentElement : document.body;
32804  return function () {
32805    return {
32806      // $FlowFixMe
32807      scrollLeft: supportOffset ? window.pageXOffset : rootElement.scrollLeft,
32808      // $FlowFixMe
32809      scrollTop: supportOffset ? window.pageYOffset : rootElement.scrollTop,
32810      // required to remove elasticity in Safari scrolling.
32811      stiffScrollTop: (0, _clamp["default"])( // $FlowFixMe
32812      supportOffset ? window.pageYOffset : rootElement.scrollTop, 0, // $FlowFixMe
32813      rootElement.scrollHeight - window.innerHeight),
32814      // $FlowFixMe
32815      scrollWidth: rootElement.scrollWidth,
32816      // $FlowFixMe
32817      scrollHeight: rootElement.scrollHeight,
32818      // $FlowFixMe
32819      clientWidth: rootElement.clientWidth,
32820      // $FlowFixMe
32821      clientHeight: rootElement.clientHeight,
32822      innerWidth: window.innerWidth,
32823      innerHeight: window.innerHeight
32824    };
32825  };
32826}();
32827
32828var areBoxesIntersecting = function areBoxesIntersecting(a, b) {
32829  return !(a.left > b.right || a.right < b.left || a.top > b.bottom || a.bottom < b.top);
32830};
32831
32832var isElementHovered = function isElementHovered(_ref5) {
32833  var element = _ref5.element,
32834      nativeEvent = _ref5.nativeEvent;
32835  var type = nativeEvent.type,
32836      target = nativeEvent.target,
32837      relatedTarget = nativeEvent.relatedTarget;
32838  var containsTarget = element.contains(target);
32839
32840  if (type === 'mouseover' && containsTarget) {
32841    return true;
32842  }
32843
32844  var containsRelated = element.contains(relatedTarget);
32845
32846  if (type === 'mouseout' && containsTarget && containsRelated) {
32847    return true;
32848  }
32849
32850  return false;
32851};
32852
32853var isElementVisible = function isElementVisible(options) {
32854  var element = options.element,
32855      config = options.event.config;
32856
32857  var _getDocumentState = getDocumentState(),
32858      clientWidth = _getDocumentState.clientWidth,
32859      clientHeight = _getDocumentState.clientHeight;
32860
32861  var scrollOffsetValue = config.scrollOffsetValue;
32862  var scrollOffsetUnit = config.scrollOffsetUnit;
32863  var isPX = scrollOffsetUnit === 'PX';
32864  var offsetPadding = isPX ? scrollOffsetValue : clientHeight * (scrollOffsetValue || 0) / 100;
32865  return areBoxesIntersecting(element.getBoundingClientRect(), {
32866    left: 0,
32867    top: offsetPadding,
32868    right: clientWidth,
32869    bottom: clientHeight - offsetPadding
32870  });
32871};
32872
32873var whenComponentActiveChange = function whenComponentActiveChange(handler) {
32874  return function (options, oldState) {
32875    var type = options.nativeEvent.type; // prettier-ignore
32876
32877    var isActive = [COMPONENT_ACTIVE, COMPONENT_INACTIVE].indexOf(type) !== -1 ? type === COMPONENT_ACTIVE : oldState.isActive;
32878    var newState = (0, _extends2["default"])({}, oldState, {
32879      isActive: isActive
32880    });
32881
32882    if (!oldState || newState.isActive !== oldState.isActive) {
32883      return handler(options, newState) || newState;
32884    }
32885
32886    return newState;
32887  };
32888};
32889
32890var whenElementHoverChange = function whenElementHoverChange(handler) {
32891  return function (options, oldState) {
32892    var newState = {
32893      elementHovered: isElementHovered(options)
32894    };
32895
32896    if (oldState ? newState.elementHovered !== oldState.elementHovered : newState.elementHovered) {
32897      return handler(options, newState) || newState;
32898    }
32899
32900    return newState;
32901  };
32902}; // $FlowFixMe
32903
32904
32905var whenElementVisibiltyChange = function whenElementVisibiltyChange(handler) {
32906  return function (options, oldState) {
32907    var newState = (0, _extends2["default"])({}, oldState, {
32908      elementVisible: isElementVisible(options)
32909    });
32910
32911    if (oldState ? newState.elementVisible !== oldState.elementVisible : newState.elementVisible) {
32912      return handler(options, newState) || newState;
32913    }
32914
32915    return newState;
32916  };
32917}; // $FlowFixMe
32918
32919
32920var whenScrollDirectionChange = function whenScrollDirectionChange(handler) {
32921  return function (options) {
32922    var oldState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32923
32924    var _getDocumentState2 = getDocumentState(),
32925        scrollTop = _getDocumentState2.stiffScrollTop,
32926        scrollHeight = _getDocumentState2.scrollHeight,
32927        innerHeight = _getDocumentState2.innerHeight;
32928
32929    var _options$event = options.event,
32930        config = _options$event.config,
32931        eventTypeId = _options$event.eventTypeId;
32932    var scrollOffsetValue = config.scrollOffsetValue,
32933        scrollOffsetUnit = config.scrollOffsetUnit;
32934    var isPX = scrollOffsetUnit === 'PX';
32935    var scrollHeightBounds = scrollHeight - innerHeight; // percent top since innerHeight may change for mobile devices which also changes the scrollTop value.
32936
32937    var percentTop = Number((scrollTop / scrollHeightBounds).toFixed(2)); // no state change
32938
32939    if (oldState && oldState.percentTop === percentTop) {
32940      return oldState;
32941    }
32942
32943    var scrollTopPadding = (isPX ? scrollOffsetValue : innerHeight * (scrollOffsetValue || 0) / 100) / scrollHeightBounds;
32944    var scrollingDown;
32945    var scrollDirectionChanged;
32946    var anchorTop = 0;
32947
32948    if (oldState) {
32949      scrollingDown = percentTop > oldState.percentTop;
32950      scrollDirectionChanged = oldState.scrollingDown !== scrollingDown;
32951      anchorTop = scrollDirectionChanged ? percentTop : oldState.anchorTop;
32952    }
32953
32954    var inBounds = eventTypeId === PAGE_SCROLL_DOWN ? percentTop >= anchorTop + scrollTopPadding : percentTop <= anchorTop - scrollTopPadding;
32955    var newState = (0, _extends2["default"])({}, oldState, {
32956      percentTop: percentTop,
32957      inBounds: inBounds,
32958      anchorTop: anchorTop,
32959      scrollingDown: scrollingDown
32960    });
32961
32962    if (oldState && inBounds && (scrollDirectionChanged || newState.inBounds !== oldState.inBounds)) {
32963      return handler(options, newState) || newState;
32964    }
32965
32966    return newState;
32967  };
32968};
32969
32970var pointIntersects = function pointIntersects(point, rect) {
32971  return point.left > rect.left && point.left < rect.right && point.top > rect.top && point.top < rect.bottom;
32972};
32973
32974var whenPageLoadFinish = function whenPageLoadFinish(handler) {
32975  return function (options, oldState) {
32976    var newState = {
32977      finished: document.readyState === 'complete'
32978    };
32979
32980    if (newState.finished && !(oldState && oldState.finshed)) {
32981      handler(options);
32982    }
32983
32984    return newState;
32985  };
32986};
32987
32988var whenPageLoadStart = function whenPageLoadStart(handler) {
32989  return function (options, oldState) {
32990    var newState = {
32991      started: true
32992    };
32993
32994    if (!oldState) {
32995      handler(options);
32996    }
32997
32998    return newState;
32999  };
33000};
33001
33002var whenClickCountChange = function whenClickCountChange(handler) {
33003  return function (options) {
33004    var oldState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
33005      clickCount: 0
33006    };
33007    var newState = {
33008      clickCount: oldState.clickCount % 2 + 1
33009    };
33010
33011    if (newState.clickCount !== oldState.clickCount) {
33012      return handler(options, newState) || newState;
33013    }
33014
33015    return newState;
33016  };
33017};
33018
33019var getComponentActiveOptions = function getComponentActiveOptions() {
33020  var allowNestedChildrenEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
33021  return (0, _extends2["default"])({}, baseActivityActionGroupOptions, {
33022    handler: withFilter(allowNestedChildrenEvents ? isOrContainsElement : isElement, whenComponentActiveChange(function (options, state) {
33023      return state.isActive ? baseActionGroupOptions.handler(options, state) : state;
33024    }))
33025  });
33026};
33027
33028var getComponentInactiveOptions = function getComponentInactiveOptions() {
33029  var allowNestedChildrenEvents = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
33030  return (0, _extends2["default"])({}, baseActivityActionGroupOptions, {
33031    handler: withFilter(allowNestedChildrenEvents ? isOrContainsElement : isElement, whenComponentActiveChange(function (options, state) {
33032      return !state.isActive ? baseActionGroupOptions.handler(options, state) : state;
33033    }))
33034  });
33035};
33036
33037var scrollIntoOutOfViewOptions = (0, _extends2["default"])({}, baseScrollActionGroupOptions, {
33038  handler: whenElementVisibiltyChange(function (options, state) {
33039    var elementVisible = state.elementVisible;
33040    var event = options.event,
33041        store = options.store;
33042
33043    var _store$getState2 = store.getState(),
33044        ixData = _store$getState2.ixData;
33045
33046    var events = ixData.events; // trigger the handler only once if only one of SCROLL_INTO or SCROLL_OUT_OF event types
33047    // are registered.
33048
33049    if (!events[event.action.config.autoStopEventId] && state.triggered) {
33050      return state;
33051    }
33052
33053    if (event.eventTypeId === SCROLL_INTO_VIEW === elementVisible) {
33054      actionGroupCreator(options);
33055      return (0, _extends2["default"])({}, state, {
33056        triggered: true
33057      });
33058    } else {
33059      return state;
33060    }
33061  })
33062});
33063var MOUSE_OUT_ROUND_THRESHOLD = 0.05;
33064
33065var _default = (_default2 = {}, (0, _defineProperty2["default"])(_default2, SLIDER_ACTIVE, getComponentActiveOptions()), (0, _defineProperty2["default"])(_default2, SLIDER_INACTIVE, getComponentInactiveOptions()), (0, _defineProperty2["default"])(_default2, DROPDOWN_OPEN, getComponentActiveOptions()), (0, _defineProperty2["default"])(_default2, DROPDOWN_CLOSE, getComponentInactiveOptions()), (0, _defineProperty2["default"])(_default2, NAVBAR_OPEN, getComponentActiveOptions(false)), (0, _defineProperty2["default"])(_default2, NAVBAR_CLOSE, getComponentInactiveOptions(false)), (0, _defineProperty2["default"])(_default2, TAB_ACTIVE, getComponentActiveOptions()), (0, _defineProperty2["default"])(_default2, TAB_INACTIVE, getComponentInactiveOptions()), (0, _defineProperty2["default"])(_default2, ECOMMERCE_CART_OPEN, {
33066  types: 'ecommerce-cart-open',
33067  handler: withFilter(isOrContainsElement, actionGroupCreator)
33068}), (0, _defineProperty2["default"])(_default2, ECOMMERCE_CART_CLOSE, {
33069  types: 'ecommerce-cart-close',
33070  handler: withFilter(isOrContainsElement, actionGroupCreator)
33071}), (0, _defineProperty2["default"])(_default2, MOUSE_CLICK, {
33072  types: 'click',
33073  handler: withFilter(isOrContainsElement, whenClickCountChange(function (options, _ref6) {
33074    var clickCount = _ref6.clickCount;
33075
33076    if (hasAutoStopEvent(options)) {
33077      clickCount === 1 && actionGroupCreator(options);
33078    } else {
33079      actionGroupCreator(options);
33080    }
33081  }))
33082}), (0, _defineProperty2["default"])(_default2, MOUSE_SECOND_CLICK, {
33083  types: 'click',
33084  handler: withFilter(isOrContainsElement, whenClickCountChange(function (options, _ref7) {
33085    var clickCount = _ref7.clickCount;
33086
33087    if (clickCount === 2) {
33088      actionGroupCreator(options);
33089    }
33090  }))
33091}), (0, _defineProperty2["default"])(_default2, MOUSE_DOWN, (0, _extends2["default"])({}, baseActionGroupOptions, {
33092  types: 'mousedown'
33093})), (0, _defineProperty2["default"])(_default2, MOUSE_UP, (0, _extends2["default"])({}, baseActionGroupOptions, {
33094  types: 'mouseup'
33095})), (0, _defineProperty2["default"])(_default2, MOUSE_OVER, {
33096  types: MOUSE_OVER_OUT_TYPES,
33097  handler: withFilter(isOrContainsElement, whenElementHoverChange(function (options, state) {
33098    if (state.elementHovered) {
33099      actionGroupCreator(options);
33100    }
33101  }))
33102}), (0, _defineProperty2["default"])(_default2, MOUSE_OUT, {
33103  types: MOUSE_OVER_OUT_TYPES,
33104  handler: withFilter(isOrContainsElement, whenElementHoverChange(function (options, state) {
33105    if (!state.elementHovered) {
33106      actionGroupCreator(options);
33107    }
33108  }))
33109}), (0, _defineProperty2["default"])(_default2, MOUSE_MOVE, {
33110  types: 'mousemove mouseout scroll',
33111  handler: function handler( // $FlowFixMe
33112  _ref8) {
33113    var store = _ref8.store,
33114        element = _ref8.element,
33115        eventConfig = _ref8.eventConfig,
33116        nativeEvent = _ref8.nativeEvent,
33117        eventStateKey = _ref8.eventStateKey;
33118    var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
33119      clientX: 0,
33120      clientY: 0,
33121      pageX: 0,
33122      pageY: 0
33123    };
33124    var basedOn = eventConfig.basedOn,
33125        selectedAxis = eventConfig.selectedAxis,
33126        continuousParameterGroupId = eventConfig.continuousParameterGroupId,
33127        reverse = eventConfig.reverse,
33128        _eventConfig$restingS = eventConfig.restingState,
33129        restingState = _eventConfig$restingS === void 0 ? 0 : _eventConfig$restingS;
33130    var _nativeEvent$clientX = nativeEvent.clientX,
33131        clientX = _nativeEvent$clientX === void 0 ? state.clientX : _nativeEvent$clientX,
33132        _nativeEvent$clientY = nativeEvent.clientY,
33133        clientY = _nativeEvent$clientY === void 0 ? state.clientY : _nativeEvent$clientY,
33134        _nativeEvent$pageX = nativeEvent.pageX,
33135        pageX = _nativeEvent$pageX === void 0 ? state.pageX : _nativeEvent$pageX,
33136        _nativeEvent$pageY = nativeEvent.pageY,
33137        pageY = _nativeEvent$pageY === void 0 ? state.pageY : _nativeEvent$pageY;
33138    var isXAxis = selectedAxis === 'X_AXIS';
33139    var isMouseOut = nativeEvent.type === 'mouseout';
33140    var value = restingState / 100;
33141    var namespacedParameterId = continuousParameterGroupId;
33142    var elementHovered = false;
33143
33144    switch (basedOn) {
33145      case _constants.EventBasedOn.VIEWPORT:
33146        {
33147          value = isXAxis ? Math.min(clientX, window.innerWidth) / window.innerWidth : Math.min(clientY, window.innerHeight) / window.innerHeight;
33148          break;
33149        }
33150
33151      case _constants.EventBasedOn.PAGE:
33152        {
33153          var _getDocumentState3 = getDocumentState(),
33154              scrollLeft = _getDocumentState3.scrollLeft,
33155              scrollTop = _getDocumentState3.scrollTop,
33156              scrollWidth = _getDocumentState3.scrollWidth,
33157              scrollHeight = _getDocumentState3.scrollHeight;
33158
33159          value = isXAxis ? Math.min(scrollLeft + pageX, scrollWidth) / scrollWidth : Math.min(scrollTop + pageY, scrollHeight) / scrollHeight;
33160          break;
33161        }
33162
33163      case _constants.EventBasedOn.ELEMENT:
33164      default:
33165        {
33166          namespacedParameterId = getNamespacedParameterId(eventStateKey, continuousParameterGroupId);
33167          var isMouseEvent = nativeEvent.type.indexOf('mouse') === 0; // Use isOrContainsElement for mouse events since they are fired from the target
33168
33169          if (isMouseEvent && isOrContainsElement({
33170            element: element,
33171            nativeEvent: nativeEvent
33172          }) !== true) {
33173            break;
33174          }
33175
33176          var rect = element.getBoundingClientRect();
33177          var left = rect.left,
33178              top = rect.top,
33179              width = rect.width,
33180              height = rect.height; // Otherwise we'll need to calculate the mouse position from the previous handler state
33181          // against the target element's rect
33182
33183          if (!isMouseEvent && !pointIntersects({
33184            left: clientX,
33185            top: clientY
33186          }, rect)) {
33187            break;
33188          }
33189
33190          elementHovered = true;
33191          value = isXAxis ? (clientX - left) / width : (clientY - top) / height;
33192          break;
33193        }
33194    } // cover case where the event is a mouse out, but the value is not quite at 100%
33195
33196
33197    if (isMouseOut && (value > 1 - MOUSE_OUT_ROUND_THRESHOLD || value < MOUSE_OUT_ROUND_THRESHOLD)) {
33198      value = Math.round(value);
33199    } // Only update based on element if the mouse is moving over or has just left the element
33200
33201
33202    if (basedOn !== _constants.EventBasedOn.ELEMENT || elementHovered || // $FlowFixMe
33203    elementHovered !== state.elementHovered) {
33204      value = reverse ? 1 - value : value;
33205      store.dispatch((0, _IX2EngineActions.parameterChanged)(namespacedParameterId, value));
33206    }
33207
33208    return {
33209      elementHovered: elementHovered,
33210      clientX: clientX,
33211      clientY: clientY,
33212      pageX: pageX,
33213      pageY: pageY
33214    };
33215  }
33216}), (0, _defineProperty2["default"])(_default2, PAGE_SCROLL, {
33217  types: SCROLL_EVENT_TYPES,
33218  // $FlowFixMe
33219  handler: function handler(_ref9) {
33220    var store = _ref9.store,
33221        eventConfig = _ref9.eventConfig;
33222    var continuousParameterGroupId = eventConfig.continuousParameterGroupId,
33223        reverse = eventConfig.reverse;
33224
33225    var _getDocumentState4 = getDocumentState(),
33226        scrollTop = _getDocumentState4.scrollTop,
33227        scrollHeight = _getDocumentState4.scrollHeight,
33228        clientHeight = _getDocumentState4.clientHeight;
33229
33230    var value = scrollTop / (scrollHeight - clientHeight);
33231    value = reverse ? 1 - value : value;
33232    store.dispatch((0, _IX2EngineActions.parameterChanged)(continuousParameterGroupId, value));
33233  }
33234}), (0, _defineProperty2["default"])(_default2, SCROLLING_IN_VIEW, {
33235  types: SCROLL_EVENT_TYPES,
33236  handler: function handler( // $FlowFixMe
33237  _ref10) {
33238    var element = _ref10.element,
33239        store = _ref10.store,
33240        eventConfig = _ref10.eventConfig,
33241        eventStateKey = _ref10.eventStateKey;
33242    var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
33243      scrollPercent: 0
33244    };
33245
33246    var _getDocumentState5 = getDocumentState(),
33247        scrollLeft = _getDocumentState5.scrollLeft,
33248        scrollTop = _getDocumentState5.scrollTop,
33249        scrollWidth = _getDocumentState5.scrollWidth,
33250        scrollHeight = _getDocumentState5.scrollHeight,
33251        visibleHeight = _getDocumentState5.clientHeight;
33252
33253    var basedOn = eventConfig.basedOn,
33254        selectedAxis = eventConfig.selectedAxis,
33255        continuousParameterGroupId = eventConfig.continuousParameterGroupId,
33256        startsEntering = eventConfig.startsEntering,
33257        startsExiting = eventConfig.startsExiting,
33258        addEndOffset = eventConfig.addEndOffset,
33259        addStartOffset = eventConfig.addStartOffset,
33260        _eventConfig$addOffse = eventConfig.addOffsetValue,
33261        addOffsetValue = _eventConfig$addOffse === void 0 ? 0 : _eventConfig$addOffse,
33262        _eventConfig$endOffse = eventConfig.endOffsetValue,
33263        endOffsetValue = _eventConfig$endOffse === void 0 ? 0 : _eventConfig$endOffse;
33264    var isXAxis = selectedAxis === 'X_AXIS';
33265
33266    if (basedOn === _constants.EventBasedOn.VIEWPORT) {
33267      var value = isXAxis ? scrollLeft / scrollWidth : scrollTop / scrollHeight;
33268
33269      if (value !== state.scrollPercent) {
33270        store.dispatch((0, _IX2EngineActions.parameterChanged)(continuousParameterGroupId, value));
33271      }
33272
33273      return {
33274        scrollPercent: value
33275      };
33276    } else {
33277      var namespacedParameterId = getNamespacedParameterId(eventStateKey, continuousParameterGroupId);
33278      var elementRect = element.getBoundingClientRect();
33279      var offsetStartPerc = (addStartOffset ? addOffsetValue : 0) / 100;
33280      var offsetEndPerc = (addEndOffset ? endOffsetValue : 0) / 100; // flip the offset percentages depending on start / exit type
33281
33282      offsetStartPerc = startsEntering ? offsetStartPerc : 1 - offsetStartPerc;
33283      offsetEndPerc = startsExiting ? offsetEndPerc : 1 - offsetEndPerc;
33284      var offsetElementTop = elementRect.top + Math.min(elementRect.height * offsetStartPerc, visibleHeight);
33285      var offsetElementBottom = elementRect.top + elementRect.height * offsetEndPerc;
33286      var offsetHeight = offsetElementBottom - offsetElementTop;
33287      var fixedScrollHeight = Math.min(visibleHeight + offsetHeight, scrollHeight);
33288      var fixedScrollTop = Math.min(Math.max(0, visibleHeight - offsetElementTop), fixedScrollHeight);
33289      var fixedScrollPerc = fixedScrollTop / fixedScrollHeight;
33290
33291      if (fixedScrollPerc !== state.scrollPercent) {
33292        store.dispatch((0, _IX2EngineActions.parameterChanged)(namespacedParameterId, fixedScrollPerc));
33293      }
33294
33295      return {
33296        scrollPercent: fixedScrollPerc
33297      };
33298    }
33299  }
33300}), (0, _defineProperty2["default"])(_default2, SCROLL_INTO_VIEW, scrollIntoOutOfViewOptions), (0, _defineProperty2["default"])(_default2, SCROLL_OUT_OF_V
33300IEW, scrollIntoOutOfViewOptions), (0, _defineProperty2["default"])(_default2, PAGE_SCROLL_DOWN, (0, _extends2["default"])({}, baseScrollActionGroupOptions, {
33301  handler: whenScrollDirectionChange(function (options, state) {
33302    if (state.scrollingDown) {
33303      actionGroupCreator(options);
33304    }
33305  })
33306})), (0, _defineProperty2["default"])(_default2, PAGE_SCROLL_UP, (0, _extends2["default"])({}, baseScrollActionGroupOptions, {
33307  handler: whenScrollDirectionChange(function (options, state) {
33308    if (!state.scrollingDown) {
33309      actionGroupCreator(options);
33310    }
33311  })
33312})), (0, _defineProperty2["default"])(_default2, PAGE_FINISH, {
33313  types: 'readystatechange IX2_PAGE_UPDATE',
33314  handler: withFilter(isElement, whenPageLoadFinish(actionGroupCreator))
33315}), (0, _defineProperty2["default"])(_default2, PAGE_START, {
33316  types: 'readystatechange IX2_PAGE_UPDATE',
33317  handler: withFilter(isElement, whenPageLoadStart(actionGroupCreator))
33318}), _default2);
33319
33320exports["default"] = _default;
33321
33322/***/ }),
33323/* 361 */
33324/***/ (function(module, exports, __webpack_require__) {
33325
vendor: 4,744 bytes, lines 33326-33505
33326var createFlow = __webpack_require__(362);
33327
33328/**
33329 * Creates a function that returns the result of invoking the given functions
33330 * with the `this` binding of the created function, where each successive
33331 * invocation is supplied the return value of the previous.
33332 *
33333 * @static
33334 * @memberOf _
33335 * @since 3.0.0
33336 * @category Util
33337 * @param {...(Function|Function[])} [funcs] The functions to invoke.
33338 * @returns {Function} Returns the new composite function.
33339 * @see _.flowRight
33340 * @example
33341 *
33342 * function square(n) {
33343 *   return n * n;
33344 * }
33345 *
33346 * var addSquare = _.flow([_.add, square]);
33347 * addSquare(1, 2);
33348 * // => 9
33349 */
33350var flow = createFlow();
33351
33352module.exports = flow;
33353
33354
33355/***/ }),
33356/* 362 */
33357/***/ (function(module, exports, __webpack_require__) {
33358
33359var LodashWrapper = __webpack_require__(88),
33360    flatRest = __webpack_require__(363),
33361    getData = __webpack_require__(149),
33362    getFuncName = __webpack_require__(150),
33363    isArray = __webpack_require__(2),
33364    isLaziable = __webpack_require__(376);
33365
33366/** Error message constants. */
33367var FUNC_ERROR_TEXT = 'Expected a function';
33368
33369/** Used to compose bitmasks for function metadata. */
33370var WRAP_CURRY_FLAG = 8,
33371    WRAP_PARTIAL_FLAG = 32,
33372    WRAP_ARY_FLAG = 128,
33373    WRAP_REARG_FLAG = 256;
33374
33375/**
33376 * Creates a `_.flow` or `_.flowRight` function.
33377 *
33378 * @private
33379 * @param {boolean} [fromRight] Specify iterating from right to left.
33380 * @returns {Function} Returns the new flow function.
33381 */
33382function createFlow(fromRight) {
33383  return flatRest(function(funcs) {
33384    var length = funcs.length,
33385        index = length,
33386        prereq = LodashWrapper.prototype.thru;
33387
33388    if (fromRight) {
33389      funcs.reverse();
33390    }
33391    while (index--) {
33392      var func = funcs[index];
33393      if (typeof func != 'function') {
33394        throw new TypeError(FUNC_ERROR_TEXT);
33395      }
33396      if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
33397        var wrapper = new LodashWrapper([], true);
33398      }
33399    }
33400    index = wrapper ? index : length;
33401    while (++index < length) {
33402      func = funcs[index];
33403
33404      var funcName = getFuncName(func),
33405          data = funcName == 'wrapper' ? getData(func) : undefined;
33406
33407      if (data && isLaziable(data[0]) &&
33408            data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
33409            !data[4].length && data[9] == 1
33410          ) {
33411        wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
33412      } else {
33413        wrapper = (func.length == 1 && isLaziable(func))
33414          ? wrapper[funcName]()
33415          : wrapper.thru(func);
33416      }
33417    }
33418    return function() {
33419      var args = arguments,
33420          value = args[0];
33421
33422      if (wrapper && args.length == 1 && isArray(value)) {
33423        return wrapper.plant(value).value();
33424      }
33425      var index = 0,
33426          result = length ? funcs[index].apply(this, args) : value;
33427
33428      while (++index < length) {
33429        result = funcs[index].call(this, result);
33430      }
33431      return result;
33432    };
33433  });
33434}
33435
33436module.exports = createFlow;
33437
33438
33439/***/ }),
33440/* 363 */
33441/***/ (function(module, exports, __webpack_require__) {
33442
33443var flatten = __webpack_require__(364),
33444    overRest = __webpack_require__(367),
33445    setToString = __webpack_require__(369);
33446
33447/**
33448 * A specialized version of `baseRest` which flattens the rest array.
33449 *
33450 * @private
33451 * @param {Function} func The function to apply a rest parameter to.
33452 * @returns {Function} Returns the new function.
33453 */
33454function flatRest(func) {
33455  return setToString(overRest(func, undefined, flatten), func + '');
33456}
33457
33458module.exports = flatRest;
33459
33460
33461/***/ }),
33462/* 364 */
33463/***/ (function(module, exports, __webpack_require__) {
33464
33465var baseFlatten = __webpack_require__(365);
33466
33467/**
33468 * Flattens `array` a single level deep.
33469 *
33470 * @static
33471 * @memberOf _
33472 * @since 0.1.0
33473 * @category Array
33474 * @param {Array} array The array to flatten.
33475 * @returns {Array} Returns the new flattened array.
33476 * @example
33477 *
33478 * _.flatten([1, [2, [3, [4]], 5]]);
33479 * // => [1, 2, [3, [4]], 5]
33480 */
33481function flatten(array) {
33482  var length = array == null ? 0 : array.length;
33483  return length ? baseFlatten(array, 1) : [];
33484}
33485
33486module.exports = flatten;
33487
33488
33489/***/ }),
33490/* 365 */
33491/***/ (function(module, exports, __webpack_require__) {
33492
33493var arrayPush = __webpack_require__(60),
33494    isFlattenable = __webpack_require__(366);
33495
33496/**
33497 * The base implementation of `_.flatten` with support for restricting flattening.
33498 *
33499 * @private
33500 * @param {Array} array The array to flatten.
33501 * @param {number} depth The maximum recursion depth.
33502 * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
33503 * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
33504 * @param {Array} [result=[]] The initial result value.
33505 * @returns {Array} Returns the new flattened array.
vendor: 4,491 bytes, lines 33506-33677
33506 */
33507function baseFlatten(array, depth, predicate, isStrict, result) {
33508  var index = -1,
33509      length = array.length;
33510
33511  predicate || (predicate = isFlattenable);
33512  result || (result = []);
33513
33514  while (++index < length) {
33515    var value = array[index];
33516    if (depth > 0 && predicate(value)) {
33517      if (depth > 1) {
33518        // Recursively flatten arrays (susceptible to call stack limits).
33519        baseFlatten(value, depth - 1, predicate, isStrict, result);
33520      } else {
33521        arrayPush(result, value);
33522      }
33523    } else if (!isStrict) {
33524      result[result.length] = value;
33525    }
33526  }
33527  return result;
33528}
33529
33530module.exports = baseFlatten;
33531
33532
33533/***/ }),
33534/* 366 */
33535/***/ (function(module, exports, __webpack_require__) {
33536
33537var Symbol = __webpack_require__(32),
33538    isArguments = __webpack_require__(48),
33539    isArray = __webpack_require__(2);
33540
33541/** Built-in value references. */
33542var spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;
33543
33544/**
33545 * Checks if `value` is a flattenable `arguments` object or array.
33546 *
33547 * @private
33548 * @param {*} value The value to check.
33549 * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
33550 */
33551function isFlattenable(value) {
33552  return isArray(value) || isArguments(value) ||
33553    !!(spreadableSymbol && value && value[spreadableSymbol]);
33554}
33555
33556module.exports = isFlattenable;
33557
33558
33559/***/ }),
33560/* 367 */
33561/***/ (function(module, exports, __webpack_require__) {
33562
33563var apply = __webpack_require__(368);
33564
33565/* Built-in method references for those with the same name as other `lodash` methods. */
33566var nativeMax = Math.max;
33567
33568/**
33569 * A specialized version of `baseRest` which transforms the rest array.
33570 *
33571 * @private
33572 * @param {Function} func The function to apply a rest parameter to.
33573 * @param {number} [start=func.length-1] The start position of the rest parameter.
33574 * @param {Function} transform The rest array transform.
33575 * @returns {Function} Returns the new function.
33576 */
33577function overRest(func, start, transform) {
33578  start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
33579  return function() {
33580    var args = arguments,
33581        index = -1,
33582        length = nativeMax(args.length - start, 0),
33583        array = Array(length);
33584
33585    while (++index < length) {
33586      array[index] = args[start + index];
33587    }
33588    index = -1;
33589    var otherArgs = Array(start + 1);
33590    while (++index < start) {
33591      otherArgs[index] = args[index];
33592    }
33593    otherArgs[start] = transform(array);
33594    return apply(func, this, otherArgs);
33595  };
33596}
33597
33598module.exports = overRest;
33599
33600
33601/***/ }),
33602/* 368 */
33603/***/ (function(module, exports) {
33604
33605/**
33606 * A faster alternative to `Function#apply`, this function invokes `func`
33607 * with the `this` binding of `thisArg` and the arguments of `args`.
33608 *
33609 * @private
33610 * @param {Function} func The function to invoke.
33611 * @param {*} thisArg The `this` binding of `func`.
33612 * @param {Array} args The arguments to invoke `func` with.
33613 * @returns {*} Returns the result of `func`.
33614 */
33615function apply(func, thisArg, args) {
33616  switch (args.length) {
33617    case 0: return func.call(thisArg);
33618    case 1: return func.call(thisArg, args[0]);
33619    case 2: return func.call(thisArg, args[0], args[1]);
33620    case 3: return func.call(thisArg, args[0], args[1], args[2]);
33621  }
33622  return func.apply(thisArg, args);
33623}
33624
33625module.exports = apply;
33626
33627
33628/***/ }),
33629/* 369 */
33630/***/ (function(module, exports, __webpack_require__) {
33631
33632var baseSetToString = __webpack_require__(370),
33633    shortOut = __webpack_require__(372);
33634
33635/**
33636 * Sets the `toString` method of `func` to return `string`.
33637 *
33638 * @private
33639 * @param {Function} func The function to modify.
33640 * @param {Function} string The `toString` result.
33641 * @returns {Function} Returns `func`.
33642 */
33643var setToString = shortOut(baseSetToString);
33644
33645module.exports = setToString;
33646
33647
33648/***/ }),
33649/* 370 */
33650/***/ (function(module, exports, __webpack_require__) {
33651
33652var constant = __webpack_require__(371),
33653    defineProperty = __webpack_require__(147),
33654    identity = __webpack_require__(71);
33655
33656/**
33657 * The base implementation of `setToString` without support for hot loop shorting.
33658 *
33659 * @private
33660 * @param {Function} func The function to modify.
33661 * @param {Function} string The `toString` result.
33662 * @returns {Function} Returns `func`.
33663 */
33664var baseSetToString = !defineProperty ? identity : function(func, string) {
33665  return defineProperty(func, 'toString', {
33666    'configurable': true,
33667    'enumerable': false,
33668    'value': constant(string),
33669    'writable': true
33670  });
33671};
33672
33673module.exports = baseSetToString;
33674
33675
33676/***/ }),
33677/* 371 */
vendor: 7,235 bytes, lines 33678-33911
33678/***/ (function(module, exports) {
33679
33680/**
33681 * Creates a function that returns `value`.
33682 *
33683 * @static
33684 * @memberOf _
33685 * @since 2.4.0
33686 * @category Util
33687 * @param {*} value The value to return from the new function.
33688 * @returns {Function} Returns the new constant function.
33689 * @example
33690 *
33691 * var objects = _.times(2, _.constant({ 'a': 1 }));
33692 *
33693 * console.log(objects);
33694 * // => [{ 'a': 1 }, { 'a': 1 }]
33695 *
33696 * console.log(objects[0] === objects[1]);
33697 * // => true
33698 */
33699function constant(value) {
33700  return function() {
33701    return value;
33702  };
33703}
33704
33705module.exports = constant;
33706
33707
33708/***/ }),
33709/* 372 */
33710/***/ (function(module, exports) {
33711
33712/** Used to detect hot functions by number of calls within a span of milliseconds. */
33713var HOT_COUNT = 800,
33714    HOT_SPAN = 16;
33715
33716/* Built-in method references for those with the same name as other `lodash` methods. */
33717var nativeNow = Date.now;
33718
33719/**
33720 * Creates a function that'll short out and invoke `identity` instead
33721 * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
33722 * milliseconds.
33723 *
33724 * @private
33725 * @param {Function} func The function to restrict.
33726 * @returns {Function} Returns the new shortable function.
33727 */
33728function shortOut(func) {
33729  var count = 0,
33730      lastCalled = 0;
33731
33732  return function() {
33733    var stamp = nativeNow(),
33734        remaining = HOT_SPAN - (stamp - lastCalled);
33735
33736    lastCalled = stamp;
33737    if (remaining > 0) {
33738      if (++count >= HOT_COUNT) {
33739        return arguments[0];
33740      }
33741    } else {
33742      count = 0;
33743    }
33744    return func.apply(undefined, arguments);
33745  };
33746}
33747
33748module.exports = shortOut;
33749
33750
33751/***/ }),
33752/* 373 */
33753/***/ (function(module, exports, __webpack_require__) {
33754
33755var WeakMap = __webpack_require__(106);
33756
33757/** Used to store function metadata. */
33758var metaMap = WeakMap && new WeakMap;
33759
33760module.exports = metaMap;
33761
33762
33763/***/ }),
33764/* 374 */
33765/***/ (function(module, exports) {
33766
33767/**
33768 * This method returns `undefined`.
33769 *
33770 * @static
33771 * @memberOf _
33772 * @since 2.3.0
33773 * @category Util
33774 * @example
33775 *
33776 * _.times(2, _.noop);
33777 * // => [undefined, undefined]
33778 */
33779function noop() {
33780  // No operation performed.
33781}
33782
33783module.exports = noop;
33784
33785
33786/***/ }),
33787/* 375 */
33788/***/ (function(module, exports) {
33789
33790/** Used to lookup unminified function names. */
33791var realNames = {};
33792
33793module.exports = realNames;
33794
33795
33796/***/ }),
33797/* 376 */
33798/***/ (function(module, exports, __webpack_require__) {
33799
33800var LazyWrapper = __webpack_require__(90),
33801    getData = __webpack_require__(149),
33802    getFuncName = __webpack_require__(150),
33803    lodash = __webpack_require__(377);
33804
33805/**
33806 * Checks if `func` has a lazy counterpart.
33807 *
33808 * @private
33809 * @param {Function} func The function to check.
33810 * @returns {boolean} Returns `true` if `func` has a lazy counterpart,
33811 *  else `false`.
33812 */
33813function isLaziable(func) {
33814  var funcName = getFuncName(func),
33815      other = lodash[funcName];
33816
33817  if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
33818    return false;
33819  }
33820  if (func === other) {
33821    return true;
33822  }
33823  var data = getData(other);
33824  return !!data && func === data[0];
33825}
33826
33827module.exports = isLaziable;
33828
33829
33830/***/ }),
33831/* 377 */
33832/***/ (function(module, exports, __webpack_require__) {
33833
33834var LazyWrapper = __webpack_require__(90),
33835    LodashWrapper = __webpack_require__(88),
33836    baseLodash = __webpack_require__(89),
33837    isArray = __webpack_require__(2),
33838    isObjectLike = __webpack_require__(20),
33839    wrapperClone = __webpack_require__(378);
33840
33841/** Used for built-in method references. */
33842var objectProto = Object.prototype;
33843
33844/** Used to check objects for own properties. */
33845var hasOwnProperty = objectProto.hasOwnProperty;
33846
33847/**
33848 * Creates a `lodash` object which wraps `value` to enable implicit method
33849 * chain sequences. Methods that operate on and return arrays, collections,
33850 * and functions can be chained together. Methods that retrieve a single value
33851 * or may return a primitive value will automatically end the chain sequence
33852 * and return the unwrapped value. Otherwise, the value must be unwrapped
33853 * with `_#value`.
33854 *
33855 * Explicit chain sequences, which must be unwrapped with `_#value`, may be
33856 * enabled using `_.chain`.
33857 *
33858 * The execution of chained methods is lazy, that is, it's deferred until
33859 * `_#value` is implicitly or explicitly called.
33860 *
33861 * Lazy evaluation allows several methods to support shortcut fusion.
33862 * Shortcut fusion is an optimization to merge iteratee calls; this avoids
33863 * the creation of intermediate arrays and can greatly reduce the number of
33864 * iteratee executions. Sections of a chain sequence qualify for shortcut
33865 * fusion if the section is applied to an array and iteratees accept only
33866 * one argument. The heuristic for whether a section qualifies for shortcut
33867 * fusion is subject to change.
33868 *
33869 * Chaining is supported in custom builds as long as the `_#value` method is
33870 * directly or indirectly included in the build.
33871 *
33872 * In addition to lodash methods, wrappers have `Array` and `String` methods.
33873 *
33874 * The wrapper `Array` methods are:
33875 * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
33876 *
33877 * The wrapper `String` methods are:
33878 * `replace` and `split`
33879 *
33880 * The wrapper methods that support shortcut fusion are:
33881 * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
33882 * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
33883 * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
33884 *
33885 * The chainable wrapper methods are:
33886 * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
33887 * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
33888 * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
33889 * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
33890 * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
33891 * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
33892 * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
33893 * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
33894 * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
33895 * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
33896 * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
33897 * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
33898 * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
33899 * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
33900 * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
33901 * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
33902 * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
33903 * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
33904 * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
33905 * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
33906 * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
33907 * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
33908 * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
33909 * `zipObject`, `zipObjectDeep`, and `zipWith`
33910 *
33911 * The wrapper methods that are **not** chainable by default are:
33912 * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
33913 * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
33914 * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
33915 * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
33916 * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
33917 * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
33918 * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
33919 * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
33920 * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
33921 * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
33922 * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
33923 * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
33924 * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
33925 * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
33926 * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
33927 * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
33928 * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
33929 * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
33930 * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
33931 * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
33932 * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
33933 * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
33934 * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
33935 * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
33936 * `upperFirst`, `value`, and `words`
33937 *
33938 * @name _
33939 * @constructor
33940 * @category Seq
33941 * @param {*} value The value to wrap in a `lodash` instance.
33942 * @returns {Object} Returns the new `lodash` wrapper instance.
33943 * @example
33944 *
33945 * function square(n) {
33946 *   return n * n;
33947 * }
33948 *
33949 * var wrapped = _([1, 2, 3]);
33950 *
33951 * // Returns an unwrapped value.
33952 * wrapped.reduce(_.add);
33953 * // => 6
33954 *
33955 * // Returns a wrapped value.
33956 * var squares = wrapped.map(square);
33957 *
33958 * _.isArray(squares);
33959 * // => false
33960 *
33961 * _.isArray(squares.value());
33962 * // => true
33963 */
33964function lodash(value) {
33965  if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
33966    if (value instanceof LodashWrapper) {
33967      return value;
33968    }
33969    if (hasOwnProperty.call(value, '__wrapped__')) {
33970      return wrapperClone(value);
33971    }
33972  }
33973  return new LodashWrapper(value);
33974}
33975
33976// Ensure wrappers are instances of `baseLodash`.
33977lodash.prototype = baseLodash.prototype;
33978lodash.prototype.constructor = lodash;
33979
33980module.exports = lodash;
33981
33982
33983/***/ }),
33984/* 378 */
33985/***/ (function(module, exports, __webpack_require__) {
33986
33987var LazyWrapper = __webpack_require__(90),
33988    LodashWrapper = __webpack_require__(88),
33989    copyArray = __webpack_require__(379);
33990
33991/**
33992 * Creates a clone of `wrapper`.
33993 *
33994 * @private
33995 * @param {Object} wrapper The wrapper to clone.
33996 * @returns {Object} Returns the cloned wrapper.
33997 */
33998function wrapperClone(wrapper) {
33999  if (wrapper instanceof LazyWrapper) {
34000    return wrapper.clone();
34001  }
34002  var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
34003  result.__actions__ = copyArray(wrapper.__actions__);
34004  result.__index__  = wrapper.__index__;
34005  result.__values__ = wrapper.__values__;
34006  return result;
34007}
34008
34009module.exports = wrapperClone;
34010
34011
34012/***/ }),
34013/* 379 */
34014/***/ (function(module, exports) {
34015
34016/**
34017 * Copies the values of `source` to `array`.
34018 *
34019 * @private
34020 * @param {Array} source The array to copy values from.
34021 * @param {Array} [array=[]] The array to copy values to.
34022 * @returns {Array} Returns `array`.
34023 */
34024function copyArray(source, array) {
34025  var index = -1,
34026      length = source.length;
34027
34028  array || (array = Array(length));
34029  while (++index < length) {
34030    array[index] = source[index];
34031  }
34032  return array;
34033}
34034
34035module.exports = copyArray;
34036
34037
34038/***/ }),
34039/* 380 */
34040/***/ (function(module, exports, __webpack_require__) {
34041
34042var baseClamp = __webpack_require__(381),
34043    toNumber = __webpack_require__(72);
34044
34045/**
34046 * Clamps `number` within the inclusive `lower` and `upper` bounds.
34047 *
34048 * @static
34049 * @memberOf _
34050 * @since 4.0.0
34051 * @category Number
34052 * @param {number} number The number to clamp.
34053 * @param {number} [lower] The lower bound.
34054 * @param {number} upper The upper bound.
34055 * @returns {number} Returns the clamped number.
34056 * @example
34057 *
34058 * _.clamp(-10, -5, 5);
34059 * // => -5
34060 *
34061 * _.clamp(10, -5, 5);
34062 * // => 5
34063 */
34064function clamp(number, lower, upper) {
34065  if (upper === undefined) {
34066    upper = lower;
34067    lower = undefined;
34068  }
34069  if (upper !== undefined) {
34070    upper = toNumber(upper);
34071    upper = upper === upper ? upper : 0;
34072  }
34073  if (lower !== undefined) {
34074    lower = toNumber(lower);
34075    lower = lower === lower ? lower : 0;
34076  }
34077  return baseClamp(toNumber(number), lower, upper);
34078}
34079
34080module.exports = clamp;
34081
34082
34083/***/ }),
34084/* 381 */
34085/***/ (function(module, exports) {
34086
34087/**
34088 * The base implementation of `_.clamp` which doesn't coerce arguments.
34089 *
34090 * @private
34091 * @param {number} number The number to clamp.
34092 * @param {number} [lower] The lower bound.
34093 * @param {number} upper The upper bound.
34094 * @returns {number} Returns the clamped number.
34095 */
34096function baseClamp(number, lower, upper) {
34097  if (number === number) {
34098    if (upper !== undefined) {
34099      number = number <= upper ? number : upper;
34100    }
34101    if (lower !== undefined) {
34102      number = number >= lower ? number : lower;
34103    }
34104  }
34105  return number;
34106}
34107
34108module.exports = baseClamp;
34109
34110
34111/***/ }),
34112/* 382 */
34113/***/ (function(module, exports, __webpack_require__) {
34114
34115"use strict";
34116 // @wf-will-never-add-flow-to-this-file
34117
34118/* globals window, document */
34119
34120/* eslint-disable no-var */
34121
34122/**
34123 * Webflow: Auto-select links to current page or section
34124 */
34125
34126var Webflow = __webpack_require__(9);
34127
34128Webflow.define('links', module.exports = function ($, _) {
34129  var api = {};
34130  var $win = $(window);
34131  var designer;
34132  var inApp = Webflow.env();
34133  var location = window.location;
34134  var tempLink = document.createElement('a');
34135  var linkCurrent = 'w--current';
34136  var indexPage = /index\.(html|php)$/;
34137  var dirList = /\/$/;
34138  var anchors;
34139  var slug; // -----------------------------------
34140  // Module methods
34141
34142  api.ready = api.design = api.preview = init; // -----------------------------------
34143  // Private methods
34144
34145  function init() {
34146    designer = inApp && Webflow.env('design');
34147    slug = Webflow.env('slug') || location.pathname || ''; // Reset scroll listener, init anchors
34148
34149    Webflow.scroll.off(scroll);
34150    anchors = []; // Test all links for a selectable href
34151
34152    var links = document.links;
34153
34154    for (var i = 0; i < links.length; ++i) {
34155      select(links[i]);
34156    } // Listen for scroll if any anchors exist
34157
34158
34159    if (anchors.length) {
34160      Webflow.scroll.on(scroll);
34161      scroll();
34162    }
34163  }
34164
34165  function select(link) {
34166    var href = designer && link.getAttribute('href-disabled') || link.getAttribute('href');
34167    tempLink.href = href; // Ignore any hrefs with a colon to safely avoid all uri schemes
34168
34169    if (href.indexOf(':') >= 0) {
34170      return;
34171    }
34172
34173    var $link = $(link); // Check for all links with hash (eg (this-host)(/this-path)#section) to this page
34174
34175    if (tempLink.hash.length > 1 && tempLink.host + tempLink.pathname === location.host + location.pathname) {
34176      // Ignore any hrefs with Google Translate type hash
34177      // Example: jQuery can't parse $('#googtrans(en|es)')
34178      // https://forum.webflow.com/t/dropdown-menus-not-working-on-site/87140
34179      if (!/^#[a-zA-Z0-9\-\_]+$/.test(tempLink.hash)) {
34180        return;
34181      }
34182
34183      var $section = $(tempLink.hash);
34184      $section.length && anchors.push({
34185        link: $link,
34186        sec: $section,
34187        active: false
34188      });
34189      return;
34190    } // Ignore empty # links
34191
34192
34193    if (href === '#' || href === '') {
34194      return;
34195    } // Determine whether the link should be selected
34196
34197
34198    var match = tempLink.href === location.href || href === slug || indexPage.test(href) && dirList.test(slug);
34199    setClass($link, linkCurrent, match);
34200  }
34201
34202  function scroll() {
34203    var viewTop = $win.scrollTop();
34204    var viewHeight = $win.height(); // Check each anchor for a section in view
34205
34206    _.each(anchors, function (anchor) {
34207      var $link = anchor.link;
34208      var $section = anchor.sec;
34209      var top = $section.offset().top;
34210      var height = $section.outerHeight();
34211      var offset = viewHeight * 0.5;
34212      var active = $section.is(':visible') && top + height - offset >= viewTop && top + offset <= viewTop + viewHeight;
34213
34214      if (anchor.active === active) {
34215        return;
34216      }
34217
34218      anchor.active = active;
34219      setClass($link, linkCurrent, active);
34220    });
34221  }
34222
34223  function setClass($elem, className, add) {
34224    var exists = $elem.hasClass(className);
34225
34226    if (add && exists) {
34227      return;
34228    }
34229
34230    if (!add && !exists) {
34231      return;
34232    }
34233
34234    add ? $elem.addClass(className) : $elem.removeClass(className);
34235  } // Export module
34236
34237
34238  return api;
34239});
34240
34241/***/ }),
34242/* 383 */
34243/***/ (function(module, exports, __webpack_require__) {
34244
34245"use strict";
34246 // @wf-will-never-add-flow-to-this-file
34247
34248/* globals window, document */
34249
34250/* eslint-disable no-var */
34251
34252/**
34253 * Webflow: Smooth scroll
34254 */
34255
34256var Webflow = __webpack_require__(9);
34257
34258Webflow.define('scroll', module.exports = function ($) {
34259  /**
34260   * A collection of namespaced events found in this module.
34261   * Namespaced events encapsulate our code, and make it safer and easier
34262   * for designers to apply custom code overrides.
34263   * @see https://api.jquery.com/on/#event-names
34264   * @typedef {Object.<string>} NamespacedEventsCollection
34265   */
34266  var NS_EVENTS = {
34267    WF_CLICK_EMPTY: 'click.wf-empty-link',
34268    WF_CLICK_SCROLL: 'click.wf-scroll'
34269  };
34270  var loc = window.location;
34271  var history = inIframe() ? null : window.history;
34272  var $win = $(window);
34273  var $doc = $(document);
34274  var $body = $(document.body);
34275
34276  var animate = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) {
34277    window.setTimeout(fn, 15);
34278  };
34279
34280  var rootTag = Webflow.env('editor') ? '.w-editor-body' : 'body';
34281  var headerSelector = 'header, ' + rootTag + ' > .header, ' + rootTag + ' > .w-nav:not([data-no-scroll])';
34282  var emptyHrefSelector = 'a[href="#"]';
34283  /**
34284   * Select only links whose href:
34285   * - contains a #
34286   * - is not one of our namespaced TabLink elements
34287   * - is not _only_ a #
34288   */
34289
34290  var localHrefSelector = 'a[href*="#"]:not(.w-tab-link):not(' + emptyHrefSelector + ')';
34291
34292  function inIframe() {
34293    try {
34294      return Boolean(window.frameElement);
34295    } catch (e) {
34296      return true;
34297    }
34298  }
34299
34300  var validHash = /^#[a-zA-Z0-9][\w:.-]*$/;
34301  /**
34302   * Determine if link navigates to current page
34303   * @param {HTMLAnchorElement} link
34304   */
34305
34306  function linksToCurrentPage(link) {
34307    return validHash.test(link.hash) && link.host + link.pathname === loc.host + loc.pathname;
34308  }
34309  /**
34310   * Check if the designer has indicated that this page should
34311   * have no scroll animation, or if the end user has set
34312   * prefers-reduced-motion in their OS
34313   */
34314
34315
34316  var reducedMotionMediaQuery = typeof window.matchMedia === 'function' && window.matchMedia('(prefers-reduced-motion: reduce)');
34317
34318  function reducedMotionEnabled() {
34319    return document.body.getAttribute('data-wf-scroll-motion') === 'none' || reducedMotionMediaQuery.matches;
34320  }
34321  /**
34322   * Determine if we should execute custom scroll
34323   */
34324
34325
34326  function validateScroll(evt) {
34327    var target = evt.currentTarget;
34328
34329    if ( // Bail if in Designer
34330    Webflow.env('design') || // Ignore links being used by jQuery mobile
34331    window.$.mobile && /(?:^|\s)ui-link(?:$|\s)/.test(target.className)) {
34332      return;
34333    }
34334
34335    var hash = linksToCurrentPage(target) ? target.hash : '';
34336    if (hash === '') return;
34337    var $el = $(hash);
34338
34339    if (!$el.length) {
34340      return;
34341    }
34342
34343    if (evt) {
34344      evt.preventDefault();
34345      evt.stopPropagation();
34346    }
34347
34348    updateHistory(hash, evt);
34349    window.setTimeout(function () {
34350      scroll($el);
34351    }, evt ? 0 : 300);
34352  }
34353
34354  function updateHistory(hash) {
34355    // Push new history state
34356    if (loc.hash !== hash && history && history.pushState && // Navigation breaks Chrome when the protocol is `file:`.
34357    !(Webflow.env.chrome && loc.protocol === 'file:')) {
34358      var oldHash = history.state && history.state.hash;
34359
34360      if (oldHash !== hash) {
34361        history.pushState({
34362          hash: hash
34363        }, '', hash);
34364      }
34365    }
34366  }
34367
34368  function scroll($targetEl) {
34369    var start = $win.scrollTop();
34370    var end = calculateScrollEndPosition($targetEl);
34371    if (start === end) return;
34372    var duration = calculateScrollDuration($targetEl, start, end);
34373    var clock = Date.now();
34374
34375    var step = function step() {
34376      var elapsed = Date.now() - clock;
34377      window.scroll(0, getY(start, end, elapsed, duration));
34378
34379      if (elapsed <= duration) {
34380        animate(step);
34381      }
34382    };
34383
34384    animate(step);
34385  }
34386
34387  function calculateScrollEndPosition($targetEl) {
34388    // If a fixed header exists, offset for the height
34389    var $header = $(headerSelector);
34390    var offsetY = $header.css('position') === 'fixed' ? $header.outerHeight() : 0;
34391    var end = $targetEl.offset().top - offsetY; // If specified, scroll so that the element ends up in the middle of the viewport
34392
34393    if ($targetEl.data('scroll') === 'mid') {
34394      var available = $win.height() - offsetY;
34395      var elHeight = $targetEl.outerHeight();
34396
34397      if (elHeight < available) {
34398        end -= Math.round((available - elHeight) / 2);
34399      }
34400    }
34401
34402    return end;
34403  }
34404
34405  function calculateScrollDuration($targetEl, start, end) {
34406    if (reducedMotionEnabled()) return 0;
34407    var mult = 1; // Check for custom time multiplier on the body and the scroll target
34408
34409    $body.add($targetEl).each(function (_, el) {
34410      var time = parseFloat(el.getAttribute('data-scroll-time'));
34411
34412      if (!isNaN(time) && time >= 0) {
34413        mult = time;
34414      }
34415    });
34416    return (472.143 * Math.log(Math.abs(start - end) + 125) - 2000) * mult;
34417  }
34418
34419  function getY(start, end, elapsed, duration) {
34420    if (elapsed > duration) {
34421      return end;
34422    }
34423
34424    return start + (end - start) * ease(elapsed / duration);
34425  }
34426
34427  function ease(t) {
34428    return t < 0.5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;
34429  }
34430
34431  function ready() {
34432    var WF_CLICK_EMPTY = NS_EVENTS.WF_CLICK_EMPTY,
34433        WF_CLICK_SCROLL = NS_EVENTS.WF_CLICK_SCROLL;
34434    $doc.on(WF_CLICK_SCROLL, localHrefSelector, validateScroll);
34435    /**
34436     * Prevent empty hash links from triggering scroll.
34437     * Legacy feature to preserve: use the default "#" link
34438     * to trigger an interaction, and do not want the page
34439     * to scroll to the top.
34440     */
34441
34442    $doc.on(WF_CLICK_EMPTY, emptyHrefSelector, function (e) {
34443      e.preventDefault();
34444    });
34445  } // Export module
34446
34447
34448  return {
34449    ready: ready
34450  };
34451});
34452
34453/***/ }),
34454/* 384 */
34455/***/ (function(module, exports, __webpack_require__) {
34456
34457"use strict";
34458 // @wf-will-never-add-flow-to-this-file
34459
34460/* globals document, window */
34461
34462/* eslint-disable no-var */
34463
34464/**
34465 * Webflow: Touch events
34466 * Supports legacy 'tap' event
34467 * Adds a 'swipe' event to desktop and mobile
34468 */
34469
34470var Webflow = __webpack_require__(9);
34471
34472Webflow.define('touch', module.exports = function ($) {
34473  var api = {};
34474  var getSelection = window.getSelection; // Delegate all legacy 'tap' events to 'click'
34475
34476  $.event.special.tap = {
34477    bindType: 'click',
34478    delegateType: 'click'
34479  };
34480
34481  api.init = function (el) {
34482    el = typeof el === 'string' ? $(el).get(0) : el;
34483    return el ? new Touch(el) : null;
34484  };
34485
34486  function Touch(el) {
34487    var active = false;
34488    var useTouch = false;
34489    var thresholdX = Math.min(Math.round(window.innerWidth * 0.04), 40);
34490    var startX;
34491    var lastX;
34492    el.addEventListener('touchstart', start, false);
34493    el.addEventListener('touchmove', move, false);
34494    el.addEventListener('touchend', end, false);
34495    el.addEventListener('touchcancel', cancel, false);
34496    el.addEventListener('mousedown', start, false);
34497    el.addEventListener('mousemove', move, false);
34498    el.addEventListener('mouseup', end, false);
34499    el.addEventListener('mouseout', cancel, false);
34500
34501    function start(evt) {
34502      // We don’t handle multi-touch events yet.
34503      var touches = evt.touches;
34504
34505      if (touches && touches.length > 1) {
34506        return;
34507      }
34508
34509      active = true;
34510
34511      if (touches) {
34512        useTouch = true;
34513        startX = touches[0].clientX;
34514      } else {
34515        startX = evt.clientX;
34516      }
34517
34518      lastX = startX;
34519    }
34520
34521    function move(evt) {
34522      if (!active) {
34523        return;
34524      }
34525
34526      if (useTouch && evt.type === 'mousemove') {
34527        evt.preventDefault();
34528        evt.stopPropagation();
34529        return;
34530      }
34531
34532      var touches = evt.touches;
34533      var x = touches ? touches[0].clientX : evt.clientX;
34534      var velocityX = x - lastX;
34535      lastX = x; // Allow swipes while pointer is down, but prevent them during text selection
34536
34537      if (Math.abs(velocityX) > thresholdX && getSelection && String(getSelection()) === '') {
34538        triggerEvent('swipe', evt, {
34539          direction: velocityX > 0 ? 'right' : 'left'
34540        });
34541        cancel();
34542      }
34543    }
34544
34545    function end(evt) {
34546      if (!active) {
34547        return;
34548      }
34549
34550      active = false;
34551
34552      if (useTouch && evt.type === 'mouseup') {
34553        evt.preventDefault();
34554        evt.stopPropagation();
34555        useTouch = false;
34556        return;
34557      }
34558    }
34559
34560    function cancel() {
34561      active = false;
34562    }
34563
34564    function destroy() {
34565      el.removeEventListener('touchstart', start, false);
34566      el.removeEventListener('touchmove', move, false);
34567      el.removeEventListener('touchend', end, false);
34568      el.removeEventListener('touchcancel', cancel, false);
34569      el.removeEventListener('mousedown', start, false);
34570      el.removeEventListener('mousemove', move, false);
34571      el.removeEventListener('mouseup', end, false);
34572      el.removeEventListener('mouseout', cancel, false);
34573      el = null;
34574    } // Public instance methods
34575
34576
34577    this.destroy = destroy;
34578  } // Wrap native event to supoprt preventdefault + stopPropagation
34579
34580
34581  function triggerEvent(type, evt, data) {
34582    var newEvent = $.Event(type, {
34583      originalEvent: evt
34584    });
34585    $(evt.target).trigger(newEvent, data);
34586  } // Listen for touch events on all nodes by default.
34587
34588
34589  api.instance = api.init(document); // Export module
34590
34591  return api;
34592});
34593
34594/***/ }),
34595/* 385 */
34596/***/ (function(module, exports, __webpack_require__) {
34597
34598"use strict";
34599 // @wf-will-never-add-flow-to-this-file
34600
34601/* globals window, document */
34602
34603/* eslint-disable no-var */
34604
34605/**
34606 * Webflow: Dropdown component
34607 */
34608
34609var Webflow = __webpack_require__(9);
34610
34611var IXEvents = __webpack_require__(56);
34612
34613var KEY_CODES = {
34614  ARROW_LEFT: 37,
34615  ARROW_UP: 38,
34616  ARROW_RIGHT: 39,
34617  ARROW_DOWN: 40,
34618  ESCAPE: 27,
34619  SPACE: 32,
34620  ENTER: 13,
34621  HOME: 36,
34622  END: 35
34623};
34624var FORCE_CLOSE = true;
34625/**
34626 * This pattern matches links that begin with a `#` AND have some alphanumeric
34627 * characters after it, including also hyphens and underscores
34628 *
34629 * Matches:
34630 * #foo
34631 * #999
34632 * #foo-bar_baz
34633 *
34634 * Does not match:
34635 * #
34636 */
34637
34638var INTERNAL_PAGE_LINK_HASHES_PATTERN = /^#[a-zA-Z0-9\-_]+$/;
34639Webflow.define('dropdown', module.exports = function ($, _) {
34640  var debounce = _.debounce;
34641  var api = {};
34642  var inApp = Webflow.env();
34643  var inPreview = false;
34644  var inDesigner;
34645  var touch = Webflow.env.touch;
34646  var namespace = '.w-dropdown';
34647  var openStateClassName = 'w--open';
34648  var ix = IXEvents.triggers;
34649  var defaultZIndex = 900; // @dropdown-depth
34650
34651  var focusOutEvent = 'focusout' + namespace;
34652  var keydownEvent = 'keydown' + namespace;
34653  var mouseEnterEvent = 'mouseenter' + namespace;
34654  var mouseMoveEvent = 'mousemove' + namespace;
34655  var mouseLeaveEvent = 'mouseleave' + namespace;
34656  var mouseUpEvent = (touch ? 'click' : 'mouseup') + namespace;
34657  var closeEvent = 'w-close' + namespace;
34658  var settingEvent = 'setting' + namespace;
34659  var $doc = $(document);
34660  var $dropdowns; // -----------------------------------
34661  // Module methods
34662
34663  api.ready = init;
34664
34665  api.design = function () {
34666    // Close all when returning from preview
34667    if (inPreview) {
34668      closeAll();
34669    }
34670
34671    inPreview = false;
34672    init();
34673  };
34674
34675  api.preview = function () {
34676    inPreview = true;
34677    init();
34678  }; // -----------------------------------
34679  // Private methods
34680
34681
34682  function init() {
34683    inDesigner = inApp && Webflow.env('design'); // Find all instances on the page
34684
34685    $dropdowns = $doc.find(namespace);
34686    $dropdowns.each(build);
34687  }
34688
34689  function build(i, el) {
34690    var $el = $(el); // Store state in data
34691
34692    var data = $.data(el, namespace);
34693
34694    if (!data) {
34695      data = $.data(el, namespace, {
34696        open: false,
34697        el: $el,
34698        config: {},
34699        selectedIdx: -1
34700      });
34701    }
34702
34703    data.toggle = data.el.children('.w-dropdown-toggle');
34704    data.list = data.el.children('.w-dropdown-list');
34705    data.links = data.list.find('a:not(.w-dropdown .w-dropdown a)');
34706    data.complete = complete(data);
34707    data.mouseLeave = makeMouseLeaveHandler(data);
34708    data.mouseUpOutside = outside(data);
34709    data.mouseMoveOutside = moveOutside(data); // Set config from data attributes
34710
34711    configure(data); // Store the IDs of the toggle button & list
34712
34713    var toggleId = data.toggle.attr('id');
34714    var listId = data.list.attr('id'); // If user did not provide toggle ID, set it
34715
34716    if (!toggleId) {
34717      toggleId = 'w-dropdown-toggle-' + i;
34718    } // If user did not provide list ID, set it
34719
34720
34721    if (!listId) {
34722      listId = 'w-dropdown-list-' + i;
34723    } // Add attributes to toggle element
34724
34725
34726    data.toggle.attr('id', toggleId);
34727    data.toggle.attr('aria-controls', listId);
34728    data.toggle.attr('aria-haspopup', 'menu');
34729    data.toggle.attr('aria-expanded', 'false'); // Hide toggle icon from ATs
34730
34731    data.toggle.find('.w-icon-dropdown-toggle').attr('aria-hidden', 'true'); // If toggle element is not a button
34732
34733    if (data.toggle.prop('tagName') !== 'BUTTON') {
34734      // Give it an appropriate role
34735      data.toggle.attr('role', 'button'); // And give it a tabindex if user has not provided one
34736
34737      if (!data.toggle.attr('tabindex')) {
34738        data.toggle.attr('tabindex', '0');
34739      }
34740    } // Add attributes to list element
34741
34742
34743    data.list.attr('id', listId);
34744    data.list.attr('aria-labelledby', toggleId);
34745    data.links.each(function (idx, link) {
34746      /**
34747       * In macOS Safari, links don't take focus on click unless they have
34748       * a tabindex. Without this, the dropdown will break.
34749       * @see https://gist.github.com/cvrebert/68659d0333a578d75372
34750       */
34751      if (!link.hasAttribute('tabindex')) link.setAttribute('tabindex', '0'); // We want to close the drop down if the href links somewhere internally
34752      // to the page
34753
34754      if (INTERNAL_PAGE_LINK_HASHES_PATTERN.test(link.hash)) {
34755        link.addEventListener('click', close.bind(null, data));
34756      }
34757    }); // Remove old events
34758
34759    data.el.off(namespace);
34760    data.toggle.off(namespace);
34761
34762    if (data.nav) {
34763      data.nav.off(namespace);
34764    }
34765
34766    var initialToggler = makeToggler(data, FORCE_CLOSE);
34767
34768    if (inDesigner) {
34769      data.el.on(settingEvent, makeSettingEventHandler(data));
34770    }
34771
34772    if (!inDesigner) {
34773      // Close in preview mode and clean the data.hovering state
34774      if (inApp) {
34775        data.hovering = false;
34776        close(data);
34777      }
34778
34779      if (data.config.hover) {
34780        data.toggle.on(mouseEnterEvent, makeMouseEnterHandler(data));
34781      }
34782
34783      data.el.on(closeEvent, initialToggler);
34784      data.el.on(keydownEvent, makeDropdownKeydownHandler(data));
34785      data.el.on(focusOutEvent, makeDropdownFocusOutHandler(data));
34786      data.toggle.on(mouseUpEvent, initialToggler);
34787      data.toggle.on(keydownEvent, makeToggleKeydownHandler(data));
34788      data.nav = data.el.closest('.w-nav');
34789      data.nav.on(closeEvent, initialToggler);
34790    }
34791  }
34792  /**
34793   * Mutate the data object with a new config property
34794   */
34795
34796
34797  function configure(data) {
34798    // Determine if z-index should be managed
34799    var zIndex = Number(data.el.css('z-index'));
34800    data.manageZ = zIndex === defaultZIndex || zIndex === defaultZIndex + 1;
34801    data.config = {
34802      hover: (data.el.attr('data-hover') === true || data.el.attr('data-hover') === '1') && !touch,
34803      delay: Number(data.el.attr('data-delay')) || 0
34804    };
34805  }
34806
34807  function makeSettingEventHandler(data) {
34808    return function (evt, options) {
34809      options = options || {};
34810      configure(data);
34811      options.open === true && open(data, true);
34812      options.open === false && close(data, {
34813        immediate: true
34814      });
34815    };
34816  }
34817
34818  function makeToggler(data, forceClose) {
34819    return debounce(function (evt) {
34820      if (data.open || evt && evt.type === 'w-close') {
34821        return close(data, {
34822          forceClose: forceClose
34823        });
34824      }
34825
34826      open(data);
34827    });
34828  }
34829
34830  function open(data) {
34831    if (data.open) {
34832      return;
34833    }
34834
34835    closeOthers(data);
34836    data.open = true;
34837    data.list.addClass(openStateClassName);
34838    data.toggle.addClass(openStateClassName);
34839    data.toggle.attr('aria-expanded', 'true'); // ARIA
34840
34841    ix.intro(0, data.el[0]);
34842    Webflow.redraw.up(); // Increase z-index to keep above other managed dropdowns
34843
34844    data.manageZ && data.el.css('z-index', defaultZIndex + 1); // Listen for click outside events
34845
34846    var isEditor = Webflow.env('editor');
34847
34848    if (!inDesigner) {
34849      $doc.on(mouseUpEvent, data.mouseUpOutside);
34850    }
34851
34852    if (data.hovering && !isEditor) {
34853      data.el.on(mouseLeaveEvent, data.mouseLeave);
34854    }
34855
34856    if (data.hovering && isEditor) {
34857      $doc.on(mouseMoveEvent, data.mouseMoveOutside);
34858    } // Clear previous delay
34859
34860
34861    window.clearTimeout(data.delayId);
34862  }
34863
34864  function close(data) {
34865    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
34866        immediate = _ref.immediate,
34867        forceClose = _ref.forceClose;
34868
34869    if (!data.open) {
34870      return;
34871    } // Do not close hover-based menus if currently hovering
34872
34873
34874    if (data.config.hover && data.hovering && !forceClose) {
34875      return;
34876    }
34877
34878    data.toggle.attr('aria-expanded', 'false');
34879    data.open = false;
34880    var config = data.config;
34881    ix.outro(0, data.el[0]); // Stop listening for click outside events
34882
34883    $doc.off(mouseUpEvent, data.mouseUpOutside);
34884    $doc.off(mouseMoveEvent, data.mouseMoveOutside);
34885    data.el.off(mouseLeaveEvent, data.mouseLeave); // Clear previous delay
34886
34887    window.clearTimeout(data.delayId); // Skip delay during immediate
34888
34889    if (!config.delay || immediate) {
34890      return data.complete();
34891    } // Optionally wait for delay before close
34892
34893
34894    data.delayId = window.setTimeout(data.complete, config.delay);
34895  }
34896
34897  function closeAll() {
34898    $doc.find(namespace).each(function (i, el) {
34899      $(el).triggerHandler(closeEvent);
34900    });
34901  }
34902
34903  function closeOthers(data) {
34904    var self = data.el[0];
34905    $dropdowns.each(function (i, other) {
34906      var $other = $(other);
34907
34908      if ($other.is(self) || $other.has(self).length) {
34909        return;
34910      }
34911
34912      $other.triggerHandler(closeEvent);
34913    });
34914  }
34915
34916  function outside(data) {
34917    // Unbind previous click handler if it exists
34918    if (data.mouseUpOutside) {
34919      $doc.off(mouseUpEvent, data.mouseUpOutside);
34920    } // Close menu when clicked outside
34921
34922
34923    return debounce(function (evt) {
34924      if (!data.open) {
34925        return;
34926      }
34927
34928      var $target = $(evt.target);
34929
34930      if ($target.closest('.w-dropdown-toggle').length) {
34931        return;
34932      }
34933
34934      var isEventOutsideDropdowns = $.inArray(data.el[0], $target.parents(namespace)) === -1;
34935      var isEditor = Webflow.env('editor');
34936
34937      if (isEventOutsideDropdowns) {
34938        if (isEditor) {
34939          var isEventOnDetachedSvg = $target.parents().length === 1 && $target.parents('svg').length === 1;
34940          var isEventOnHoverControls = $target.parents('.w-editor-bem-EditorHoverControls').length;
34941
34942          if (isEventOnDetachedSvg || isEventOnHoverControls) {
34943            return;
34944          }
34945        }
34946
34947        close(data);
34948      }
34949    });
34950  }
34951
34952  function complete(data) {
34953    return function () {
34954      data.list.removeClass(openStateClassName);
34955      data.toggle.removeClass(openStateClassName); // Reset z-index for managed dropdowns
34956
34957      data.manageZ && data.el.css('z-index', '');
34958    };
34959  }
34960
34961  function makeMouseEnterHandler(data) {
34962    return function () {
34963      data.hovering = true;
34964      open(data);
34965    };
34966  }
34967
34968  function makeMouseLeaveHandler(data) {
34969    return function () {
34970      data.hovering = false; // We do not want the list to close upon mouseleave
34971      // if one of the links has focus
34972
34973      if (!data.links.is(':focus')) {
34974        close(data);
34975      }
34976    };
34977  }
34978
34979  function moveOutside(data) {
34980    return debounce(function (evt) {
34981      if (!data.open) {
34982        return;
34983      }
34984
34985      var $target = $(evt.target);
34986      var isEventOutsideDropdowns = $.inArray(data.el[0], $target.parents(namespace)) === -1;
34987
34988      if (isEventOutsideDropdowns) {
34989        var isEventOnHoverControls = $target.parents('.w-editor-bem-EditorHoverControls').length;
34990        var isEventOnHoverToolbar = $target.parents('.w-editor-bem-RTToolbar').length;
34991        var $editorOverlay = $('.w-editor-bem-EditorOverlay');
34992        var isDropdownInEdition = $editorOverlay.find('.w-editor-edit-outline').length || $editorOverlay.find('.w-editor-bem-RTToolbar').length;
34993
34994        if (isEventOnHoverControls || isEventOnHoverToolbar || isDropdownInEdition) {
34995          return;
34996        }
34997
34998        data.hovering = false;
34999        close(data);
35000      }
35001    });
35002  }
35003
35004  function makeDropdownKeydownHandler(data) {
35005    return function (evt) {
35006      // Do not respond to keyboard events in designer or preview mode,
35007      // or if the list is not open
35008      if (inDesigner || inPreview || !data.open) {
35009        return;
35010      } // Realign selectedIdx with the menu item that is currently in focus.
35011      // We need this because we do not track the `Tab` key activity!
35012
35013
35014      data.selectedIdx = data.links.index(document.activeElement); // Evaluate item-selection logic
35015
35016      switch (evt.keyCode) {
35017        case KEY_CODES.HOME:
35018          {
35019            if (!data.open) return;
35020            data.selectedIdx = 0;
35021            focusSelectedLink(data);
35022            return evt.preventDefault();
35023          }
35024
35025        case KEY_CODES.END:
35026          {
35027            if (!data.open) return;
35028            data.selectedIdx = data.links.length - 1;
35029            focusSelectedLink(data);
35030            return evt.preventDefault();
35031          }
35032
35033        case KEY_CODES.ESCAPE:
35034          {
35035            close(data);
35036            data.toggle.focus();
35037            return evt.stopPropagation();
35038          }
35039
35040        case KEY_CODES.ARROW_RIGHT:
35041        case KEY_CODES.ARROW_DOWN:
35042          {
35043            data.selectedIdx = Math.min(data.links.length - 1, data.selectedIdx + 1);
35044            focusSelectedLink(data);
35045            return evt.preventDefault();
35046          }
35047
35048        case KEY_CODES.ARROW_LEFT:
35049        case KEY_CODES.ARROW_UP:
35050          {
35051            data.selectedIdx = Math.max(-1, data.selectedIdx - 1);
35052            focusSelectedLink(data);
35053            return evt.preventDefault();
35054          }
35055      }
35056    };
35057  }
35058
35059  function focusSelectedLink(data) {
35060    if (data.links[data.selectedIdx]) {
35061      data.links[data.selectedIdx].focus();
35062    }
35063  }
35064
35065  function makeToggleKeydownHandler(data) {
35066    // We want to close immediately
35067    // if interacting via keyboard
35068    var toggler = makeToggler(data, FORCE_CLOSE);
35069    return function (evt) {
35070      // Do not respond to keyboard events in designer or preview
35071      if (inDesigner || inPreview) return; // If the menu is not open, we don't want
35072      // the up or Down arrows to do anything
35073
35074      if (!data.open) {
35075        switch (evt.keyCode) {
35076          case KEY_CODES.ARROW_UP:
35077          case KEY_CODES.ARROW_DOWN:
35078            {
35079              return evt.stopPropagation();
35080            }
35081        }
35082      }
35083
35084      switch (evt.keyCode) {
35085        case KEY_CODES.SPACE:
35086        case KEY_CODES.ENTER:
35087          {
35088            toggler();
35089            evt.stopPropagation();
35090            return evt.preventDefault();
35091          }
35092      }
35093    };
35094  }
35095
35096  function makeDropdownFocusOutHandler(data) {
35097    return debounce(function (evt) {
35098      var relatedTarget = evt.relatedTarget,
35099          target = evt.target;
35100      var menuEl = data.el[0];
35101      /**
35102       * Close menu
35103       * With focusout events, the `relatedTarget` is the element that will next receive focus.
35104       * @see: https://developer.mozilla.org/en-US/docs/Web/API/FocusEvent/relatedTarget
35105       */
35106
35107      var menuContainsFocus = menuEl.contains(relatedTarget) || menuEl.contains(target);
35108
35109      if (!menuContainsFocus) {
35110        close(data);
35111      }
35112
35113      return evt.stopPropagation();
35114    });
35115  } // Export module
35116
35117
35118  return api;
35119});
35120
35121/***/ }),
35122/* 386 */
35123/***/ (function(module, exports, __webpack_require__) {
35124
35125"use strict";
35126 // @wf-will-never-add-flow-to-this-file
35127
35128/* globals
35129  window,
35130  document,
35131  FormData,
35132  WEBFLOW_FORM_API_HOST,
35133  WEBFLOW_FORM_OLDIE_HOST
35134*/
35135
35136/* eslint-disable no-var */
35137
35138/**
35139 * Webflow: Forms
35140 */
35141
35142var _interopRequireDefault = __webpack_require__(1);
35143
35144var _slicedToArray2 = _interopRequireDefault(__webpack_require__(387));
35145
35146var Webflow = __webpack_require__(9);
35147
35148Webflow.define('forms', module.exports = function ($, _) {
35149  var api = {};
35150  var $doc = $(document);
35151  var $forms;
35152  var loc = window.location;
35153  var retro = window.XDomainRequest && !window.atob;
35154  var namespace = '.w-form';
35155  var siteId;
35156  var emailField = /e(-)?mail/i;
35157  var emailValue = /^\S+@\S+$/;
35158  var alert = window.alert;
35159  var inApp = Webflow.env();
35160  var listening;
35161  var formUrl;
35162  var signFileUrl; // MailChimp domains: list-manage.com + mirrors
35163
35164  var chimpRegex = /list-manage[1-9]?.com/i;
35165
35166  var disconnected = _.debounce(function () {
35167    alert('Oops! This page has improperly configured forms. Please contact your website administrator to fix this issue.');
35168  }, 100);
35169
35170  api.ready = api.design = api.preview = function () {
35171    // Init forms
35172    init(); // Wire document events on published site only once
35173
35174    if (!inApp && !listening) {
35175      addListeners();
35176    }
35177  };
35178
35179  function init() {
35180    siteId = $('html').attr('data-wf-site');
35181    formUrl = "https://webflow.com" + '/api/v1/form/' + siteId; // Work around same-protocol IE XDR limitation - without this IE9 and below forms won't submit
35182
35183    if (retro && formUrl.indexOf("https://webflow.com") >= 0) {
35184      formUrl = formUrl.replace("https://webflow.com", "http://formdata.webflow.com");
35185    }
35186
35187    signFileUrl = "".concat(formUrl, "/signFile");
35188    $forms = $(namespace + ' form');
35189
35190    if (!$forms.length) {
35191      return;
35192    }
35193
35194    $forms.each(build);
35195  }
35196
35197  function build(i, el) {
35198    // Store form state using namespace
35199    var $el = $(el);
35200    var data = $.data(el, namespace);
35201
35202    if (!data) {
35203      data = $.data(el, namespace, {
35204        form: $el
35205      });
35206    } // data.form
35207
35208
35209    reset(data);
35210    var wrap = $el.closest('div.w-form');
35211    data.done = wrap.find('> .w-form-done');
35212    data.fail = wrap.find('> .w-form-fail');
35213    data.fileUploads = wrap.find('.w-file-upload');
35214    data.fileUploads.each(function (j) {
35215      initFileUpload(j, data);
35216    });
35217    var action = data.action = $el.attr('action');
35218    data.handler = null;
35219    data.redirect = $el.attr('data-redirect'); // MailChimp form
35220
35221    if (chimpRegex.test(action)) {
35222      data.handler = submitMailChimp;
35223      return;
35224    } // Custom form action
35225
35226
35227    if (action) {
35228      return;
35229    } // Webflow forms for hosting accounts
35230
35231
35232    if (siteId) {
35233      data.handler = typeof hostedSubmitWebflow === 'function' ? hostedSubmitWebflow : exportedSubmitWebflow;
35234      return;
35235    } // Alert for disconnected Webflow forms
35236
35237
35238    disconnected();
35239  }
35240
35241  function addListeners() {
35242    listening = true; // Handle form submission for Webflow forms
35243
35244    $doc.on('submit', namespace + ' form', function (evt) {
35245      var data = $.data(this, namespace);
35246
35247      if (data.handler) {
35248        data.evt = evt;
35249        data.handler(data);
35250      }
35251    }); // handle checked ui for custom checkbox and radio button
35252
35253    var CHECKBOX_CLASS_NAME = '.w-checkbox-input';
35254    var RADIO_INPUT_CLASS_NAME = '.w-radio-input';
35255    var CHECKED_CLASS = 'w--redirected-checked';
35256    var FOCUSED_CLASS = 'w--redirected-focus';
35257    var CUSTOM_CONTROLS = [['checkbox', CHECKBOX_CLASS_NAME], ['radio', RADIO_INPUT_CLASS_NAME]];
35258    $doc.on('change', namespace + " form input[type=\"checkbox\"]:not(" + CHECKBOX_CLASS_NAME + ')', function (evt) {
35259      $(evt.target).siblings(CHECKBOX_CLASS_NAME).toggleClass(CHECKED_CLASS);
35260    });
35261    $doc.on('change', namespace + " form input[type=\"radio\"]", function (evt) {
35262      $("input[name=\"".concat(evt.target.name, "\"]:not(").concat(CHECKBOX_CLASS_NAME, ")")).map(function (i, el) {
35263        return $(el).siblings(RADIO_INPUT_CLASS_NAME).removeClass(CHECKED_CLASS);
35264      });
35265      var $target = $(evt.target);
35266
35267      if (!$target.hasClass('w-radio-input')) {
35268        $target.siblings(RADIO_INPUT_CLASS_NAME).addClass(CHECKED_CLASS);
35269      }
35270    });
35271    CUSTOM_CONTROLS.forEach(function (_ref) {
35272      var _ref2 = (0, _slicedToArray2["default"])(_ref, 2),
35273          controlType = _ref2[0],
35274          customControlClassName = _ref2[1];
35275
35276      $doc.on('focus', namespace + " form input[type=\"".concat(controlType, "\"]:not(") + customControlClassName + ')', function (evt) {
35277        $(evt.target).siblings(customControlClassName).addClass(FOCUSED_CLASS);
35278      });
35279      $doc.on('blur', namespace + " form input[type=\"".concat(controlType, "\"]:not(") + customControlClassName + ')', function (evt) {
35280        $(evt.target).siblings(customControlClassName).removeClass(FOCUSED_CLASS);
35281      });
35282    });
35283  } // Reset data common to all submit handlers
35284
35285
35286  function reset(data) {
35287    var btn = data.btn = data.form.find(':input[type="submit"]');
35288    data.wait = data.btn.attr('data-wait') || null;
35289    data.success = false;
35290    btn.prop('disabled', false);
35291    data.label && btn.val(data.label);
35292  } // Disable submit button
35293
35294
35295  function disableBtn(data) {
35296    var btn = data.btn;
35297    var wait = data.wait;
35298    btn.prop('disabled', true); // Show wait text and store previous label
35299
35300    if (wait) {
35301      data.label = btn.val();
35302      btn.val(wait);
35303    }
35304  } // Find form fields, validate, and set value pairs
35305
35306
35307  function findFields(form, result) {
35308    var status = null;
35309    result = result || {}; // The ":input" selector is a jQuery shortcut to select all inputs, selects, textareas
35310
35311    form.find(':input:not([type="submit"]):not([type="file"])').each(function (i, el) {
35312      var field = $(el);
35313      var type = field.attr('type');
35314      var name = field.attr('data-name') || field.attr('name') || 'Field ' + (i + 1);
35315      var value = field.val();
35316
35317      if (type === 'checkbox') {
35318        value = field.is(':checked');
35319      } else if (type === 'radio') {
35320        // Radio group value already processed
35321        if (result[name] === null || typeof result[name] === 'string') {
35322          return;
35323        }
35324
35325        value = form.find('input[name="' + field.attr('name') + '"]:checked').val() || null;
35326      }
35327
35328      if (typeof value === 'string') {
35329        value = $.trim(value);
35330      }
35331
35332      result[name] = value;
35333      status = status || getStatus(field, type, name, value);
35334    });
35335    return status;
35336  }
35337
35338  function findFileUploads(form) {
35339    var result = {};
35340    form.find(':input[type="file"]').each(function (i, el) {
35341      var field = $(el);
35342      var name = field.attr('data-name') || field.attr('name') || 'File ' + (i + 1);
35343      var value = field.attr('data-value');
35344
35345      if (typeof value === 'string') {
35346        value = $.trim(value);
35347      }
35348
35349      result[name] = value;
35350    });
35351    return result;
35352  }
35353
35354  function getStatus(field, type, name, value) {
35355    var status = null;
35356
35357    if (type === 'password') {
35358      status = 'Passwords cannot be submitted.';
35359    } else if (field.attr('required')) {
35360      if (!value) {
35361        status = 'Please fill out the required field: ' + name;
35362      } else if (emailField.test(field.attr('type'))) {
35363        if (!emailValue.test(value)) {
35364          status = 'Please enter a valid email address for: ' + name;
35365        }
35366      }
35367    } else if (name === 'g-recaptcha-response' && !value) {
35368      status = 'Please confirm you’re not a robot.';
35369    }
35370
35371    return status;
35372  }
35373
35374  function exportedSubmitWebflow(data) {
35375    preventDefault(data);
35376    afterSubmit(data);
35377  } // Submit form to MailChimp
35378
35379
35380  function submitMailChimp(data) {
35381    reset(data);
35382    var form = data.form;
35383    var payload = {}; // Skip Ajax submission if http/s mismatch, fallback to POST instead
35384
35385    if (/^https/.test(loc.href) && !/^https/.test(data.action)) {
35386      form.attr('method', 'post');
35387      return;
35388    }
35389
35390    preventDefault(data); // Find & populate all fields
35391
35392    var status = findFields(form, payload);
35393
35394    if (status) {
35395      return alert(status);
35396    } // Disable submit button
35397
35398
35399    disableBtn(data); // Use special format for MailChimp params
35400
35401    var fullName;
35402
35403    _.each(payload, function (value, key) {
35404      if (emailField.test(key)) {
35405        payload.EMAIL = value;
35406      }
35407
35408      if (/^((full[ _-]?)?name)$/i.test(key)) {
35409        fullName = value;
35410      }
35411
35412      if (/^(first[ _-]?name)$/i.test(key)) {
35413        payload.FNAME = value;
35414      }
35415
35416      if (/^(last[ _-]?name)$/i.test(key)) {
35417        payload.LNAME = value;
35418      }
35419    });
35420
35421    if (fullName && !payload.FNAME) {
35422      fullName = fullName.split(' ');
35423      payload.FNAME = fullName[0];
35424      payload.LNAME = payload.LNAME || fullName[1];
35425    } // Use the (undocumented) MailChimp jsonp api
35426
35427
35428    var url = data.action.replace('/post?', '/post-json?') + '&c=?'; // Add special param to prevent bot signups
35429
35430    var userId = url.indexOf('u=') + 2;
35431    userId = url.substring(userId, url.indexOf('&', userId));
35432    var listId = url.indexOf('id=') + 3;
35433    listId = url.substring(listId, url.indexOf('&', listId));
35434    payload['b_' + userId + '_' + listId] = '';
35435    $.ajax({
35436      url: url,
35437      data: payload,
35438      dataType: 'jsonp'
35439    }).done(function (resp) {
35440      data.success = resp.result === 'success' || /already/.test(resp.msg);
35441
35442      if (!data.success) {
35443        console.info('MailChimp error: ' + resp.msg);
35444      }
35445
35446      afterSubmit(data);
35447    }).fail(function () {
35448      afterSubmit(data);
35449    });
35450  } // Common callback which runs after all Ajax submissions
35451
35452
35453  function afterSubmit(data) {
35454    var form = data.form;
35455    var redirect = data.redirect;
35456    var success = data.success; // Redirect to a success url if defined
35457
35458    if (success && redirect) {
35459      Webflow.location(redirect);
35460      return;
35461    } // Show or hide status divs
35462
35463
35464    data.done.toggle(success);
35465    data.fail.toggle(!success); // Hide form on success
35466
35467    form.toggle(!success); // Reset data and enable submit button
35468
35469    reset(data);
35470  }
35471
35472  function preventDefault(data) {
35473    data.evt && data.evt.preventDefault();
35474    data.evt = null;
35475  }
35476
35477  function initFileUpload(i, form) {
35478    if (!form.fileUploads || !form.fileUploads[i]) {
35479      return;
35480    }
35481
35482    var file;
35483    var $el = $(form.fileUploads[i]);
35484    var $defaultWrap = $el.find('> .w-file-upload-default');
35485    var $uploadingWrap = $el.find('> .w-file-upload-uploading');
35486    var $successWrap = $el.find('> .w-file-upload-success');
35487    var $errorWrap = $el.find('> .w-file-upload-error');
35488    var $input = $defaultWrap.find('.w-file-upload-input');
35489    var $label = $defaultWrap.find('.w-file-upload-label');
35490    var $labelChildren = $label.children();
35491    var $errorMsgEl = $errorWrap.find('.w-file-upload-error-msg');
35492    var $fileEl = $successWrap.find('.w-file-upload-file');
35493    var $removeEl = $successWrap.find('.w-file-remove-link');
35494    var $fileNameEl = $fileEl.find('.w-file-upload-file-name');
35495    var sizeErrMsg = $errorMsgEl.attr('data-w-size-error');
35496    var typeErrMsg = $errorMsgEl.attr('data-w-type-error');
35497    var genericErrMsg = $errorMsgEl.attr('data-w-generic-error');
35498
35499    if (!inApp) {
35500      $removeEl.on('click', function () {
35501        $input.removeAttr('data-value');
35502        $input.val('');
35503        $fileNameEl.html('');
35504        $defaultWrap.toggle(true);
35505        $successWrap.toggle(false);
35506      });
35507      $input.on('change', function (e) {
35508        file = e.target && e.target.files && e.target.files[0];
35509
35510        if (!file) {
35511          return;
35512        } // Show uploading
35513
35514
35515        $defaultWrap.toggle(false);
35516        $errorWrap.toggle(false);
35517        $uploadingWrap.toggle(true); // Set filename
35518
35519        $fileNameEl.text(file.name); // Disable submit button
35520
35521        if (!isUploading()) {
35522          disableBtn(form);
35523        }
35524
35525        form.fileUploads[i].uploading = true;
35526        signFile(file, afterSign);
35527      }); // Setting input width 1px and height equal label
35528      // This is so the browser required error will show up
35529
35530      var height = $label.outerHeight();
35531      $input.height(height);
35532      $input.width(1);
35533    } else {
35534      $input.on('click', function (e) {
35535        e.preventDefault();
35536      });
35537      $label.on('click', function (e) {
35538        e.preventDefault();
35539      });
35540      $labelChildren.on('click', function (e) {
35541        e.preventDefault();
35542      });
35543    }
35544
35545    function parseError(err) {
35546      var errorMsg = err.responseJSON && err.responseJSON.msg;
35547      var userError = genericErrMsg;
35548
35549      if (typeof errorMsg === 'string' && errorMsg.indexOf('InvalidFileTypeError') === 0) {
35550        userError = typeErrMsg;
35551      } else if (typeof errorMsg === 'string' && errorMsg.indexOf('MaxFileSizeError') === 0) {
35552        userError = sizeErrMsg;
35553      }
35554
35555      $errorMsgEl.text(userError);
35556      $input.removeAttr('data-value');
35557      $input.val('');
35558      $uploadingWrap.toggle(false);
35559      $defaultWrap.toggle(true);
35560      $errorWrap.toggle(true);
35561      form.fileUploads[i].uploading = false;
35562
35563      if (!isUploading()) {
35564        reset(form);
35565      }
35566    }
35567
35568    function afterSign(err, data) {
35569      if (err) {
35570        return parseError(err);
35571      }
35572
35573      var fileName = data.fileName;
35574      var postData = data.postData;
35575      var fileId = data.fileId;
35576      var s3Url = data.s3Url;
35577      $input.attr('data-value', fileId);
35578      uploadS3(s3Url, postData, file, fileName, afterUpload);
35579    }
35580
35581    function afterUpload(err) {
35582      if (err) {
35583        return parseError(err);
35584      } // Show success
35585
35586
35587      $uploadingWrap.toggle(false);
35588      $successWrap.css('display', 'inline-block');
35589      form.fileUploads[i].uploading = false;
35590
35591      if (!isUploading()) {
35592        reset(form);
35593      }
35594    }
35595
35596    function isUploading() {
35597      var uploads = form.fileUploads && form.fileUploads.toArray() || [];
35598      return uploads.some(function (value) {
35599        return value.uploading;
35600      });
35601    }
35602  }
35603
35604  function signFile(file, cb) {
35605    var payload = {
35606      name: file.name,
35607      size: file.size
35608    };
35609    $.ajax({
35610      type: 'POST',
35611      url: signFileUrl,
35612      data: payload,
35613      dataType: 'json',
35614      crossDomain: true
35615    }).done(function (data) {
35616      cb(null, data);
35617    }).fail(function (err) {
35618      cb(err);
35619    });
35620  }
35621
35622  function uploadS3(url, data, file, fileName, cb) {
35623    var formData = new FormData();
35624
35625    for (var k in data) {
35626      formData.append(k, data[k]);
35627    }
35628
35629    formData.append('file', file, fileName);
35630    $.ajax({
35631      type: 'POST',
35632      url: url,
35633      data: formData,
35634      processData: false,
35635      contentType: false
35636    }).done(function () {
35637      cb(null);
35638    }).fail(function (err) {
35639      cb(err);
35640    });
35641  } // Export module
35642
35643
35644  return api;
35645});
35646
35647/***/ }),
35648/* 387 */
35649/***/ (function(module, exports, __webpack_require__) {
35650
35651var arrayWithHoles = __webpack_require__(388);
35652
35653var iterableToArrayLimit = __webpack_require__(389);
35654
35655var nonIterableRest = __webpack_require__(390);
35656
35657function _slicedToArray(arr, i) {
35658  return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();
35659}
35660
35661module.exports = _slicedToArray;
35662
35663/***/ }),
35664/* 388 */
35665/***/ (function(module, exports) {
35666
35667function _arrayWithHoles(arr) {
35668  if (Array.isArray(arr)) return arr;
35669}
35670
35671module.exports = _arrayWithHoles;
35672
35673/***/ }),
35674/* 389 */
35675/***/ (function(module, exports) {
35676
35677function _iterableToArrayLimit(arr, i) {
35678  var _arr = [];
35679  var _n = true;
35680  var _d = false;
35681  var _e = undefined;
35682
35683  try {
35684    for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
35685      _arr.push(_s.value);
35686
35687      if (i && _arr.length === i) break;
35688    }
35689  } catch (err) {
35690    _d = true;
35691    _e = err;
35692  } finally {
35693    try {
35694      if (!_n && _i["return"] != null) _i["return"]();
35695    } finally {
35696      if (_d) throw _e;
35697    }
35698  }
35699
35700  return _arr;
35701}
35702
35703module.exports = _iterableToArrayLimit;
35704
35705/***/ }),
35706/* 390 */
35707/***/ (function(module, exports) {
35708
35709function _nonIterableRest() {
35710  throw new TypeError("Invalid attempt to destructure non-iterable instance");
35711}
35712
35713module.exports = _nonIterableRest;
35714
35715/***/ }),
35716/* 391 */
35717/***/ (function(module, exports, __webpack_require__) {
35718
35719"use strict";
35720 // @wf-will-never-add-flow-to-this-file
35721
35722/* globals window, document */
35723
35724/* eslint-disable no-var */
35725
35726/**
35727 * Webflow: Navbar component
35728 */
35729
35730var Webflow = __webpack_require__(9);
35731
35732var IXEvents = __webpack_require__(56);
35733
35734var KEY_CODES = {
35735  ARROW_LEFT: 37,
35736  ARROW_UP: 38,
35737  ARROW_RIGHT: 39,
35738  ARROW_DOWN: 40,
35739  ESCAPE: 27,
35740  SPACE: 32,
35741  ENTER: 13,
35742  HOME: 36,
35743  END: 35
35744};
35745Webflow.define('navbar', module.exports = function ($, _) {
35746  var api = {};
35747  var tram = $.tram;
35748  var $win = $(window);
35749  var $doc = $(document);
35750  var debounce = _.debounce;
35751  var $body;
35752  var $navbars;
35753  var designer;
35754  var inEditor;
35755  var inApp = Webflow.env();
35756  var overlay = '<div class="w-nav-overlay" data-wf-ignore />';
35757  var namespace = '.w-nav';
35758  var navbarOpenedButton = 'w--open';
35759  var navbarOpenedDropdown = 'w--nav-dropdown-open';
35760  var navbarOpenedDropdownToggle = 'w--nav-dropdown-toggle-open';
35761  var navbarOpenedDropdownList = 'w--nav-dropdown-list-open';
35762  var navbarOpenedLink = 'w--nav-link-open';
35763  var ix = IXEvents.triggers;
35764  var menuSibling = $(); // -----------------------------------
35765  // Module methods
35766
35767  api.ready = api.design = api.preview = init;
35768
35769  api.destroy = function () {
35770    menuSibling = $();
35771    removeListeners();
35772
35773    if ($navbars && $navbars.length) {
35774      $navbars.each(teardown);
35775    }
35776  }; // -----------------------------------
35777  // Private methods
35778
35779
35780  function init() {
35781    designer = inApp && Webflow.env('design');
35782    inEditor = Webflow.env('editor');
35783    $body = $(document.body); // Find all instances on the page
35784
35785    $navbars = $doc.find(namespace);
35786
35787    if (!$navbars.length) {
35788      return;
35789    }
35790
35791    $navbars.each(build); // Wire events
35792
35793    removeListeners();
35794    addListeners();
35795  }
35796
35797  function removeListeners() {
35798    Webflow.resize.off(resizeAll);
35799  }
35800
35801  function addListeners() {
35802    Webflow.resize.on(resizeAll);
35803  }
35804
35805  function resizeAll() {
35806    $navbars.each(resize);
35807  }
35808
35809  function build(i, el) {
35810    var $el = $(el); // Store state in data
35811
35812    var data = $.data(el, namespace);
35813
35814    if (!data) {
35815      data = $.data(el, namespace, {
35816        open: false,
35817        el: $el,
35818        config: {},
35819        selectedIdx: -1
35820      });
35821    }
35822
35823    data.menu = $el.find('.w-nav-menu');
35824    data.links = data.menu.find('.w-nav-link');
35825    data.dropdowns = data.menu.find('.w-dropdown');
35826    data.dropdownToggle = data.menu.find('.w-dropdown-toggle');
35827    data.dropdownList = data.menu.find('.w-dropdown-list');
35828    data.button = $el.find('.w-nav-button');
35829    data.container = $el.find('.w-container');
35830    data.overlayContainerId = 'w-nav-overlay-' + i;
35831    data.outside = outside(data); //   If the brand links exists and is set to link to the homepage, the
35832    // default setting, then add an aria-label
35833
35834    var navBrandLink = $el.find('.w-nav-brand');
35835
35836    if (navBrandLink && navBrandLink.attr('href') === '/' && navBrandLink.attr('aria-label') == null) {
35837      navBrandLink.attr('aria-label', 'home');
35838    } //   VoiceOver bug, when items that disallow user selection are focused
35839    // VoiceOver gets confused and scrolls to the end of the page. ¯\_(ツ)_/¯
35840
35841
35842    data.button.attr('style', '-webkit-user-select: text;'); // Add attributes to toggle element
35843
35844    if (data.button.attr('aria-label') == null) {
35845      data.button.attr('aria-label', 'menu');
35846    }
35847
35848    data.button.attr('role', 'button');
35849    data.button.attr('tabindex', '0');
35850    data.button.attr('aria-controls', data.overlayContainerId);
35851    data.button.attr('aria-haspopup', 'menu');
35852    data.button.attr('aria-expanded', 'false'); // Remove old events
35853
35854    data.el.off(namespace);
35855    data.button.off(namespace);
35856    data.menu.off(namespace); // Set config from data attributes
35857
35858    configure(data); // Add events based on mode
35859
35860    if (designer) {
35861      removeOverlay(data);
35862      data.el.on('setting' + namespace, handler(data));
35863    } else {
35864      addOverlay(data);
35865      data.button.on('click' + namespace, toggle(data));
35866      data.menu.on('click' + namespace, 'a', navigate(data));
35867      data.button.on('keydown' + namespace, makeToggleButtonKeyboardHandler(data));
35868      data.el.on('keydown' + namespace, makeLinksKeyboardHandler(data));
35869    } // Trigger initial resize
35870
35871
35872    resize(i, el);
35873  }
35874
35875  function teardown(i, el) {
35876    var data = $.data(el, namespace);
35877
35878    if (data) {
35879      removeOverlay(data);
35880      $.removeData(el, namespace);
35881    }
35882  }
35883
35884  function removeOverlay(data) {
35885    if (!data.overlay) {
35886      return;
35887    }
35888
35889    close(data, true);
35890    data.overlay.remove();
35891    data.overlay = null;
35892  }
35893
35894  function addOverlay(data) {
35895    if (data.overlay) {
35896      return;
35897    }
35898
35899    data.overlay = $(overlay).appendTo(data.el);
35900    data.overlay.attr('id', data.overlayContainerId);
35901    data.parent = data.menu.parent();
35902    close(data, true);
35903  }
35904
35905  function configure(data) {
35906    var config = {};
35907    var old = data.config || {}; // Set config options from data attributes
35908
35909    var animation = config.animation = data.el.attr('data-animation') || 'default';
35910    config.animOver = /^over/.test(animation);
35911    config.animDirect = /left$/.test(animation) ? -1 : 1; // Re-open menu if the animation type changed
35912
35913    if (old.animation !== animation) {
35914      data.open && _.defer(reopen, data);
35915    }
35916
35917    config.easing = data.el.attr('data-easing') || 'ease';
35918    config.easing2 = data.el.attr('data-easing2') || 'ease';
35919    var duration = data.el.attr('data-duration');
35920    config.duration = duration != null ? Number(duration) : 400;
35921    config.docHeight = data.el.attr('data-doc-height'); // Store config in data
35922
35923    data.config = config;
35924  }
35925
35926  function handler(data) {
35927    return function (evt, options) {
35928      options = options || {};
35929      var winWidth = $win.width();
35930      configure(data);
35931      options.open === true && open(data, true);
35932      options.open === false && close(data, true); // Reopen if media query changed after setting
35933
35934      data.open && _.defer(function () {
35935        if (winWidth !== $win.width()) {
35936          reopen(data);
35937        }
35938      });
35939    };
35940  }
35941
35942  function makeToggleButtonKeyboardHandler(data) {
35943    return function (evt) {
35944      switch (evt.keyCode) {
35945        case KEY_CODES.SPACE:
35946        case KEY_CODES.ENTER:
35947          {
35948            // Toggle returns a function
35949            toggle(data)();
35950            evt.preventDefault();
35951            return evt.stopPropagation();
35952          }
35953
35954        case KEY_CODES.ESCAPE:
35955          {
35956            close(data);
35957            evt.preventDefault();
35958            return evt.stopPropagation();
35959          }
35960
35961        case KEY_CODES.ARROW_RIGHT:
35962        case KEY_CODES.ARROW_DOWN:
35963        case KEY_CODES.HOME:
35964        case KEY_CODES.END:
35965          {
35966            if (!data.open) {
35967              evt.preventDefault();
35968              return evt.stopPropagation();
35969            }
35970
35971            if (evt.keyCode === KEY_CODES.END) {
35972              data.selectedIdx = data.links.length - 1;
35973            } else {
35974              data.selectedIdx = 0;
35975            }
35976
35977            focusSelectedLink(data);
35978            evt.preventDefault();
35979            return evt.stopPropagation();
35980          }
35981      }
35982    };
35983  }
35984
35985  function makeLinksKeyboardHandler(data) {
35986    return function (evt) {
35987      if (!data.open) {
35988        return;
35989      } // Realign selectedIdx with the menu item that is currently in focus.
35990      // We need this because we do not track the `Tab` key activity!
35991
35992
35993      data.selectedIdx = data.links.index(document.activeElement);
35994
35995      switch (evt.keyCode) {
35996        case KEY_CODES.HOME:
35997        case KEY_CODES.END:
35998          {
35999            if (evt.keyCode === KEY_CODES.END) {
36000              data.selectedIdx = data.links.length - 1;
36001            } else {
36002              data.selectedIdx = 0;
36003            }
36004
36005            focusSelectedLink(data);
36006            evt.preventDefault();
36007            return evt.stopPropagation();
36008          }
36009
36010        case KEY_CODES.ESCAPE:
36011          {
36012            close(data); // Focus toggle button
36013
36014            data.button.focus();
36015            evt.preventDefault();
36016            return evt.stopPropagation();
36017          }
36018
36019        case KEY_CODES.ARROW_LEFT:
36020        case KEY_CODES.ARROW_UP:
36021          {
36022            data.selectedIdx = Math.max(-1, data.selectedIdx - 1);
36023            focusSelectedLink(data);
36024            evt.preventDefault();
36025            return evt.stopPropagation();
36026          }
36027
36028        case KEY_CODES.ARROW_RIGHT:
36029        case KEY_CODES.ARROW_DOWN:
36030          {
36031            data.selectedIdx = Math.min(data.links.length - 1, data.selectedIdx + 1);
36032            focusSelectedLink(data);
36033            evt.preventDefault();
36034            return evt.stopPropagation();
36035          }
36036      }
36037    };
36038  }
36039
36040  function focusSelectedLink(data) {
36041    if (data.links[data.selectedIdx]) {
36042      var selectedElement = data.links[data.selectedIdx];
36043      selectedElement.focus();
36044      navigate(selectedElement);
36045    }
36046  }
36047
36048  function reopen(data) {
36049    if (!data.open) {
36050      return;
36051    }
36052
36053    close(data, true);
36054    open(data, true);
36055  }
36056
36057  function toggle(data) {
36058    // Debounce toggle to wait for accurate open state
36059    return debounce(function () {
36060      data.open ? close(data) : open(data);
36061    });
36062  }
36063
36064  function navigate(data) {
36065    return function (evt) {
36066      var link = $(this);
36067      var href = link.attr('href'); // Avoid late clicks on touch devices
36068
36069      if (!Webflow.validClick(evt.currentTarget)) {
36070        evt.preventDefault();
36071        return;
36072      } // Close when navigating to an in-page anchor
36073
36074
36075      if (href && href.indexOf('#') === 0 && data.open) {
36076        close(data);
36077      }
36078    };
36079  }
36080
36081  function outside(data) {
36082    // Unbind previous click handler if it exists
36083    if (data.outside) {
36084      $doc.off('click' + namespace, data.outside);
36085    }
36086
36087    return function (evt) {
36088      var $target = $(evt.target); // Ignore clicks on Editor overlay UI
36089
36090      if (inEditor && $target.closest('.w-editor-bem-EditorOverlay').length) {
36091        return;
36092      } // Close menu when clicked outside, debounced to wait for state
36093
36094
36095      outsideDebounced(data, $target);
36096    };
36097  }
36098
36099  var outsideDebounced = debounce(function (data, $target) {
36100    if (!data.open) {
36101      return;
36102    }
36103
36104    var menu = $target.closest('.w-nav-menu');
36105
36106    if (!data.menu.is(menu)) {
36107      close(data);
36108    }
36109  });
36110
36111  function resize(i, el) {
36112    var data = $.data(el, namespace);
36112 // Check for collapsed state based on button display
36113
36114    var collapsed = data.collapsed = data.button.css('display') !== 'none'; // Close menu if button is no longer visible (and not in designer)
36115
36116    if (data.open && !collapsed && !designer) {
36117      close(data, true);
36118    } // Set max-width of links + dropdowns to match container
36119
36120
36121    if (data.container.length) {
36122      var updateEachMax = updateMax(data);
36123      data.links.each(updateEachMax);
36124      data.dropdowns.each(updateEachMax);
36125    } // If currently open, update height to match body
36126
36127
36128    if (data.open) {
36129      setOverlayHeight(data);
36130    }
36131  }
36132
36133  var maxWidth = 'max-width';
36134
36135  function updateMax(data) {
36136    // Set max-width of each element to match container
36137    var containMax = data.container.css(maxWidth);
36138
36139    if (containMax === 'none') {
36140      containMax = '';
36141    }
36142
36143    return function (i, link) {
36144      link = $(link);
36145      link.css(maxWidth, ''); // Don't set the max-width if an upstream value exists
36146
36147      if (link.css(maxWidth) === 'none') {
36148        link.css(maxWidth, containMax);
36149      }
36150    };
36151  }
36152
36153  function addMenuOpen(i, el) {
36154    el.setAttribute('data-nav-menu-open', '');
36155  }
36156
36157  function removeMenuOpen(i, el) {
36158    el.removeAttribute('data-nav-menu-open');
36159  }
36160
36161  function open(data, immediate) {
36162    if (data.open) {
36163      return;
36164    }
36165
36166    data.open = true;
36167    data.menu.each(addMenuOpen);
36168    data.links.addClass(navbarOpenedLink);
36169    data.dropdowns.addClass(navbarOpenedDropdown);
36170    data.dropdownToggle.addClass(navbarOpenedDropdownToggle);
36171    data.dropdownList.addClass(navbarOpenedDropdownList);
36172    data.button.addClass(navbarOpenedButton);
36173    var config = data.config;
36174    var animation = config.animation;
36175
36176    if (animation === 'none' || !tram.support.transform || config.duration <= 0) {
36177      immediate = true;
36178    }
36179
36180    var bodyHeight = setOverlayHeight(data);
36181    var menuHeight = data.menu.outerHeight(true);
36182    var menuWidth = data.menu.outerWidth(true);
36183    var navHeight = data.el.height();
36184    var navbarEl = data.el[0];
36185    resize(0, navbarEl);
36186    ix.intro(0, navbarEl);
36187    Webflow.redraw.up(); // Listen for click outside events
36188
36189    if (!designer) {
36190      $doc.on('click' + namespace, data.outside);
36191    } // No transition for immediate
36192
36193
36194    if (immediate) {
36195      complete();
36196      return;
36197    }
36198
36199    var transConfig = 'transform ' + config.duration + 'ms ' + config.easing; // Add menu to overlay
36200
36201    if (data.overlay) {
36202      menuSibling = data.menu.prev();
36203      data.overlay.show().append(data.menu);
36204    } // Over left/right
36205
36206
36207    if (config.animOver) {
36208      tram(data.menu).add(transConfig).set({
36209        x: config.animDirect * menuWidth,
36210        height: bodyHeight
36211      }).start({
36212        x: 0
36213      }).then(complete);
36214      data.overlay && data.overlay.width(menuWidth);
36215      return;
36216    } // Drop Down
36217
36218
36219    var offsetY = navHeight + menuHeight;
36220    tram(data.menu).add(transConfig).set({
36221      y: -offsetY
36222    }).start({
36223      y: 0
36224    }).then(complete);
36225
36226    function complete() {
36227      data.button.attr('aria-expanded', 'true');
36228    }
36229  }
36230
36231  function setOverlayHeight(data) {
36232    var config = data.config;
36233    var bodyHeight = config.docHeight ? $doc.height() : $body.height();
36234
36235    if (config.animOver) {
36236      data.menu.height(bodyHeight);
36237    } else if (data.el.css('position') !== 'fixed') {
36238      bodyHeight -= data.el.outerHeight(true);
36239    }
36240
36241    data.overlay && data.overlay.height(bodyHeight);
36242    return bodyHeight;
36243  }
36244
36245  function close(data, immediate) {
36246    if (!data.open) {
36247      return;
36248    }
36249
36250    data.open = false;
36251    data.button.removeClass(navbarOpenedButton);
36252    var config = data.config;
36253
36254    if (config.animation === 'none' || !tram.support.transform || config.duration <= 0) {
36255      immediate = true;
36256    }
36257
36258    ix.outro(0, data.el[0]); // Stop listening for click outside events
36259
36260    $doc.off('click' + namespace, data.outside);
36261
36262    if (immediate) {
36263      tram(data.menu).stop();
36264      complete();
36265      return;
36266    }
36267
36268    var transConfig = 'transform ' + config.duration + 'ms ' + config.easing2;
36269    var menuHeight = data.menu.outerHeight(true);
36270    var menuWidth = data.menu.outerWidth(true);
36271    var navHeight = data.el.height(); // Over left/right
36272
36273    if (config.animOver) {
36274      tram(data.menu).add(transConfig).start({
36275        x: menuWidth * config.animDirect
36276      }).then(complete);
36277      return;
36278    } // Drop Down
36279
36280
36281    var offsetY = navHeight + menuHeight;
36282    tram(data.menu).add(transConfig).start({
36283      y: -offsetY
36284    }).then(complete);
36285
36286    function complete() {
36287      data.menu.height('');
36288      tram(data.menu).set({
36289        x: 0,
36290        y: 0
36291      });
36292      data.menu.each(removeMenuOpen);
36293      data.links.removeClass(navbarOpenedLink);
36294      data.dropdowns.removeClass(navbarOpenedDropdown);
36295      data.dropdownToggle.removeClass(navbarOpenedDropdownToggle);
36296      data.dropdownList.removeClass(navbarOpenedDropdownList);
36297
36298      if (data.overlay && data.overlay.children().length) {
36299        // Move menu back to parent at the original location
36300        menuSibling.length ? data.menu.insertAfter(menuSibling) : data.menu.prependTo(data.parent);
36301        data.overlay.attr('style', '').hide();
36302      } // Trigger event so other components can hook in (dropdown)
36303
36304
36305      data.el.triggerHandler('w-close');
36306      data.button.attr('aria-expanded', 'false');
36307    }
36308  } // Export module
36309
36310
36311  return api;
36312});
36313
36314/***/ }),
36315/* 392 */
36316/***/ (function(module, exports, __webpack_require__) {
36317
36318"use strict";
36319 // @wf-will-never-add-flow-to-this-file
36320
36321/* global window, document */
36322
36323/* eslint-disable no-var */
36324
36325/**
36326 * Webflow: Slider component
36327 */
36328
36329var Webflow = __webpack_require__(9);
36330
36331var IXEvents = __webpack_require__(56);
36332
36333var KEY_CODES = {
36334  ARROW_LEFT: 37,
36335  ARROW_UP: 38,
36336  ARROW_RIGHT: 39,
36337  ARROW_DOWN: 40,
36338  SPACE: 32,
36339  ENTER: 13,
36340  HOME: 36,
36341  END: 35
36342};
36343var FOCUSABLE_SELECTOR = 'a[href], area[href], [role="button"], input, select, textarea, button, iframe, object, embed, *[tabindex], *[contenteditable]';
36344Webflow.define('slider', module.exports = function ($, _) {
36345  var api = {};
36346  var tram = $.tram;
36347  var $doc = $(document);
36348  var $sliders;
36349  var designer;
36350  var inApp = Webflow.env();
36351  var namespace = '.w-slider';
36352  var dot = '<div class="w-slider-dot" data-wf-ignore />';
36353  var ariaLiveLabelHtml = '<div aria-live="off" aria-atomic="true" class="w-slider-aria-label" data-wf-ignore />';
36354  var forceShow = 'w-slider-force-show';
36355  var ix = IXEvents.triggers;
36356  var fallback;
36357  var inRedraw; // -----------------------------------
36358  // Module methods
36359
36360  api.ready = function () {
36361    designer = Webflow.env('design');
36362    init();
36363  };
36364
36365  api.design = function () {
36366    designer = true;
36367    init();
36368  };
36369
36370  api.preview = function () {
36371    designer = false;
36372    init();
36373  };
36374
36375  api.redraw = function () {
36376    inRedraw = true;
36377    init();
36378  };
36379
36380  api.destroy = removeListeners; // -----------------------------------
36381  // Private methods
36382
36383  function init() {
36384    // Find all sliders on the page
36385    $sliders = $doc.find(namespace);
36386
36387    if (!$sliders.length) {
36388      return;
36389    }
36390
36391    $sliders.each(build);
36392    inRedraw = null;
36393
36394    if (fallback) {
36395      return;
36396    }
36397
36398    removeListeners();
36399    addListeners();
36400  }
36401
36402  function removeListeners() {
36403    Webflow.resize.off(renderAll);
36404    Webflow.redraw.off(api.redraw);
36405  }
36406
36407  function addListeners() {
36408    Webflow.resize.on(renderAll);
36409    Webflow.redraw.on(api.redraw);
36410  }
36411
36412  function renderAll() {
36413    $sliders.filter(':visible').each(render);
36414  }
36415
36416  function build(i, el) {
36417    var $el = $(el); // Store slider state in data
36418
36419    var data = $.data(el, namespace);
36420
36421    if (!data) {
36422      data = $.data(el, namespace, {
36423        index: 0,
36424        depth: 1,
36425        hasFocus: {
36426          keyboard: false,
36427          mouse: false
36428        },
36429        el: $el,
36430        config: {}
36431      });
36432    }
36433
36434    data.mask = $el.children('.w-slider-mask');
36435    data.left = $el.children('.w-slider-arrow-left');
36436    data.right = $el.children('.w-slider-arrow-right');
36437    data.nav = $el.children('.w-slider-nav');
36438    data.slides = data.mask.children('.w-slide');
36439    data.slides.each(ix.reset);
36440
36441    if (inRedraw) {
36442      data.maskWidth = 0;
36443    }
36444
36445    if ($el.attr('role') === undefined) {
36446      $el.attr('role', 'region');
36447    }
36448
36449    if ($el.attr('aria-label') === undefined) {
36450      $el.attr('aria-label', 'carousel');
36451    } // Store the ID of the slider slide view mask
36452
36453
36454    var slideViewId = data.mask.attr('id'); // If user did not provide an ID, set it
36455
36456    if (!slideViewId) {
36457      slideViewId = 'w-slider-mask-' + i;
36458      data.mask.attr('id', slideViewId);
36459    } // Create aria live label
36460
36461
36462    data.ariaLiveLabel = $(ariaLiveLabelHtml).appendTo(data.mask); // Add attributes to left/right buttons
36463
36464    data.left.attr('role', 'button');
36465    data.left.attr('tabindex', '0');
36466    data.left.attr('aria-controls', slideViewId);
36467
36468    if (data.left.attr('aria-label') === undefined) {
36469      data.left.attr('aria-label', 'previous slide');
36470    }
36471
36472    data.right.attr('role', 'button');
36473    data.right.attr('tabindex', '0');
36474    data.right.attr('aria-controls', slideViewId);
36475
36476    if (data.right.attr('aria-label') === undefined) {
36477      data.right.attr('aria-label', 'next slide');
36478    } // Disable in old browsers
36479
36480
36481    if (!tram.support.transform) {
36482      data.left.hide();
36483      data.right.hide();
36484      data.nav.hide();
36485      fallback = true;
36486      return;
36487    } // Remove old events
36488
36489
36490    data.el.off(namespace);
36491    data.left.off(namespace);
36492    data.right.off(namespace);
36493    data.nav.off(namespace); // Set config from data attributes
36494
36495    configure(data); // Add events based on mode
36496
36497    if (designer) {
36498      data.el.on('setting' + namespace, handler(data));
36499      stopTimer(data);
36500      data.hasTimer = false;
36501    } else {
36502      data.el.on('swipe' + namespace, handler(data));
36503      data.left.on('click' + namespace, previousFunction(data));
36504      data.right.on('click' + namespace, next(data));
36505      data.left.on('keydown' + namespace, keyboardSlideButtonsFunction(data, previousFunction));
36506      data.right.on('keydown' + namespace, keyboardSlideButtonsFunction(data, next)); // Listen to nav keyboard events
36507
36508      data.nav.on('keydown' + namespace, '> div', handler(data)); // Start timer if autoplay is true, only once
36509
36510      if (data.config.autoplay && !data.hasTimer) {
36511        data.hasTimer = true;
36512        data.timerCount = 1;
36513        startTimer(data);
36514      }
36515
36516      data.el.on('mouseenter' + namespace, hasFocus(data, true, 'mouse'));
36517      data.el.on('focusin' + namespace, hasFocus(data, true, 'keyboard'));
36518      data.el.on('mouseleave' + namespace, hasFocus(data, false, 'mouse'));
36519      data.el.on('focusout' + namespace, hasFocus(data, false, 'keyboard'));
36520    } // Listen to nav click events
36521
36522
36523    data.nav.on('click' + namespace, '> div', handler(data)); // Remove gaps from formatted html (for inline-blocks)
36524
36525    if (!inApp) {
36526      data.mask.contents().filter(function () {
36527        return this.nodeType === 3;
36528      }).remove();
36529    } // If slider or any parent is hidden, temporarily show for measurements (https://github.com/webflow/webflow/issues/24921)
36530
36531
36532    var $elHidden = $el.filter(':hidden');
36533    $elHidden.addClass(forceShow);
36534    var $elHiddenParents = $el.parents(':hidden');
36535    $elHiddenParents.addClass(forceShow); // Run first render
36536
36537    render(i, el); // If slider or any parent is hidden, reset after temporarily showing for measurements
36538
36539    $elHidden.removeClass(forceShow);
36540    $elHiddenParents.removeClass(forceShow);
36541  }
36542
36543  function configure(data) {
36544    var config = {};
36545    config.crossOver = 0; // Set config options from data attributes
36546
36547    config.animation = data.el.attr('data-animation') || 'slide';
36548
36549    if (config.animation === 'outin') {
36550      config.animation = 'cross';
36551      config.crossOver = 0.5;
36552    }
36553
36554    config.easing = data.el.attr('data-easing') || 'ease';
36555    var duration = data.el.attr('data-duration');
36556    config.duration = duration != null ? parseInt(duration, 10) : 500;
36557
36558    if (isAttrTrue(data.el.attr('data-infinite'))) {
36559      config.infinite = true;
36560    }
36561
36562    if (isAttrTrue(data.el.attr('data-disable-swipe'))) {
36563      config.disableSwipe = true;
36564    }
36565
36566    if (isAttrTrue(data.el.attr('data-hide-arrows'))) {
36567      config.hideArrows = true;
36568    } else if (data.config.hideArrows) {
36569      data.left.show();
36570      data.right.show();
36571    }
36572
36573    if (isAttrTrue(data.el.attr('data-autoplay'))) {
36574      config.autoplay = true;
36575      config.delay = parseInt(data.el.attr('data-delay'), 10) || 2000;
36576      config.timerMax = parseInt(data.el.attr('data-autoplay-limit'), 10); // Disable timer on first touch or mouse down
36577
36578      var touchEvents = 'mousedown' + namespace + ' touchstart' + namespace;
36579
36580      if (!designer) {
36581        data.el.off(touchEvents).one(touchEvents, function () {
36582          stopTimer(data);
36583        });
36584      }
36585    } // Use edge buffer to help calculate page count
36586
36587
36588    var arrowWidth = data.right.width();
36589    config.edge = arrowWidth ? arrowWidth + 40 : 100; // Store config in data
36590
36591    data.config = config;
36592  }
36593
36594  function isAttrTrue(value) {
36595    return value === '1' || value === 'true';
36596  }
36597
36598  function hasFocus(data, focusIn, eventType) {
36599    return function (evt) {
36600      if (!focusIn) {
36601        // Prevent Focus Out if moving to another element in the slider
36602        if ($.contains(data.el.get(0), evt.relatedTarget)) {
36603          return;
36604        }
36605
36606        data.hasFocus[eventType] = focusIn; // Prevent Aria live change if focused by other input
36607
36608        if (data.hasFocus.mouse && eventType === 'keyboard' || data.hasFocus.keyboard && eventType === 'mouse') {
36609          return;
36610        }
36611      } else {
36612        data.hasFocus[eventType] = focusIn;
36613      }
36614
36615      if (focusIn) {
36616        data.ariaLiveLabel.attr('aria-live', 'polite');
36617
36618        if (data.hasTimer) {
36619          stopTimer(data);
36620        }
36621      } else {
36622        data.ariaLiveLabel.attr('aria-live', 'off');
36623
36624        if (data.hasTimer) {
36625          startTimer(data);
36626        }
36627      }
36628
36629      return;
36630    };
36631  }
36632
36633  function keyboardSlideButtonsFunction(data, directionFunction) {
36634    return function (evt) {
36635      switch (evt.keyCode) {
36636        case KEY_CODES.SPACE:
36637        case KEY_CODES.ENTER:
36638          {
36639            // DirectionFunction returns a function
36640            directionFunction(data)();
36641            evt.preventDefault();
36642            return evt.stopPropagation();
36643          }
36644      }
36645    };
36646  }
36647
36648  function previousFunction(data) {
36649    return function () {
36650      change(data, {
36651        index: data.index - 1,
36652        vector: -1
36653      });
36654    };
36655  }
36656
36657  function next(data) {
36658    return function () {
36659      change(data, {
36660        index: data.index + 1,
36661        vector: 1
36662      });
36663    };
36664  }
36665
36666  function select(data, value) {
36667    // Select page based on slide element index
36668    var found = null;
36669
36670    if (value === data.slides.length) {
36671      init();
36672      layout(data); // Rebuild and find new slides
36673    }
36674
36675    _.each(data.anchors, function (anchor, index) {
36676      $(anchor.els).each(function (i, el) {
36677        if ($(el).index() === value) {
36678          found = index;
36679        }
36680      });
36681    });
36682
36683    if (found != null) {
36684      change(data, {
36685        index: found,
36686        immediate: true
36687      });
36688    }
36689  }
36690
36691  function startTimer(data) {
36692    stopTimer(data);
36693    var config = data.config;
36694    var timerMax = config.timerMax;
36695
36696    if (timerMax && data.timerCount++ > timerMax) {
36697      return;
36698    }
36699
36700    data.timerId = window.setTimeout(function () {
36701      if (data.timerId == null || designer) {
36702        return;
36703      }
36704
36705      next(data)();
36706      startTimer(data);
36707    }, config.delay);
36708  }
36709
36710  function stopTimer(data) {
36711    window.clearTimeout(data.timerId);
36712    data.timerId = null;
36713  }
36714
36715  function handler(data) {
36716    return function (evt, options) {
36717      options = options || {};
36718      var config = data.config; // Designer settings
36719
36720      if (designer && evt.type === 'setting') {
36721        if (options.select === 'prev') {
36722          return previousFunction(data)();
36723        }
36724
36725        if (options.select === 'next') {
36726          return next(data)();
36727        }
36728
36729        configure(data);
36730        layout(data);
36731
36732        if (options.select == null) {
36733          return;
36734        }
36735
36736        select(data, options.select);
36737        return;
36738      } // Swipe event
36739
36740
36741      if (evt.type === 'swipe') {
36742        if (config.disableSwipe) {
36743          return;
36744        }
36745
36746        if (Webflow.env('editor')) {
36747          return;
36748        }
36749
36750        if (options.direction === 'left') {
36751          return next(data)();
36752        }
36753
36754        if (options.direction === 'right') {
36755          return previousFunction(data)();
36756        }
36757
36758        return;
36759      } // Page buttons
36760
36761
36762      if (data.nav.has(evt.target).length) {
36763        var index = $(evt.target).index();
36764
36765        if (evt.type === 'click') {
36766          change(data, {
36767            index: index
36768          });
36769        }
36770
36771        if (evt.type === 'keydown') {
36772          switch (evt.keyCode) {
36773            case KEY_CODES.ENTER:
36774            case KEY_CODES.SPACE:
36775              {
36776                change(data, {
36777                  index: index
36778                });
36779                evt.preventDefault();
36780                break;
36781              }
36782
36783            case KEY_CODES.ARROW_LEFT:
36784            case KEY_CODES.ARROW_UP:
36785              {
36786                focusDot(data.nav, Math.max(index - 1, 0));
36787                evt.preventDefault();
36788                break;
36789              }
36790
36791            case KEY_CODES.ARROW_RIGHT:
36792            case KEY_CODES.ARROW_DOWN:
36793              {
36794                focusDot(data.nav, Math.min(index + 1, data.pages));
36795                evt.preventDefault();
36796                break;
36797              }
36798
36799            case KEY_CODES.HOME:
36800              {
36801                focusDot(data.nav, 0);
36802                evt.preventDefault();
36803                break;
36804              }
36805
36806            case KEY_CODES.END:
36807              {
36808                focusDot(data.nav, data.pages);
36809                evt.preventDefault();
36810                break;
36811              }
36812
36813            default:
36814              {
36815                return;
36816              }
36817          }
36818        }
36819      }
36820    };
36821  }
36822
36823  function focusDot($nav, index) {
36824    // Focus nav dot; don't change class to active
36825    var $active = $nav.children().eq(index).focus();
36826    $nav.children().not($active);
36827  }
36828
36829  function change(data, options) {
36830    options = options || {};
36831    var config = data.config;
36832    var anchors = data.anchors; // Set new index
36833
36834    data.previous = data.index;
36835    var index = options.index;
36836    var shift = {};
36837
36838    if (index < 0) {
36839      index = anchors.length - 1;
36840
36841      if (config.infinite) {
36842        // Shift first slide to the end
36843        shift.x = -data.endX;
36844        shift.from = 0;
36845        shift.to = anchors[0].width;
36846      }
36847    } else if (index >= anchors.length) {
36848      index = 0;
36849
36850      if (config.infinite) {
36851        // Shift last slide to the start
36852        shift.x = anchors[anchors.length - 1].width;
36853        shift.from = -anchors[anchors.length - 1].x;
36854        shift.to = shift.from - shift.x;
36855      }
36856    }
36857
36858    data.index = index; // Select nav dot; set class active
36859
36860    var $active = data.nav.children().eq(index).addClass('w-active').attr('aria-pressed', 'true').attr('tabindex', '0');
36861    data.nav.children().not($active).removeClass('w-active').attr('aria-pressed', 'false').attr('tabindex', '-1'); // Hide arrows
36862
36863    if (config.hideArrows) {
36864      data.index === anchors.length - 1 ? data.right.hide() : data.right.show();
36865      data.index === 0 ? data.left.hide() : data.left.show();
36866    } // Get page offset from anchors
36867
36868
36869    var lastOffsetX = data.offsetX || 0;
36870    var offsetX = data.offsetX = -anchors[data.index].x;
36871    var resetConfig = {
36872      x: offsetX,
36873      opacity: 1,
36874      visibility: ''
36875    }; // Transition slides
36876
36877    var targets = $(anchors[data.index].els);
36878    var prevTargs = $(anchors[data.previous] && anchors[data.previous].els);
36879    var others = data.slides.not(targets);
36880    var animation = config.animation;
36881    var easing = config.easing;
36882    var duration = Math.round(config.duration);
36883    var vector = options.vector || (data.index > data.previous ? 1 : -1);
36884    var fadeRule = 'opacity ' + duration + 'ms ' + easing;
36885    var slideRule = 'transform ' + duration + 'ms ' + easing; // Make active slides' content focusable
36886
36887    targets.find(FOCUSABLE_SELECTOR).removeAttr('tabindex');
36888    targets.removeAttr('aria-hidden'); // Voiceover bug: Sometimes descendants are still visible, so hide everything...
36889
36890    targets.find('*').removeAttr('aria-hidden'); // Prevent focus on inactive slides' content
36891
36892    others.find(FOCUSABLE_SELECTOR).attr('tabindex', '-1');
36893    others.attr('aria-hidden', 'true'); // Voiceover bug: Sometimes descendants are still visible, so hide everything...
36894
36895    others.find('*').attr('aria-hidden', 'true'); // Trigger IX events
36896
36897    if (!designer) {
36898      targets.each(ix.intro);
36899      others.each(ix.outro);
36900    } // Set immediately after layout changes (but not during redraw)
36901
36902
36903    if (options.immediate && !inRedraw) {
36904      tram(targets).set(resetConfig);
36905      resetOthers();
36906      return;
36907    } // Exit early if index is unchanged
36908
36909
36910    if (data.index === data.previous) {
36911      return;
36912    } // Announce slide change to screen reader
36913
36914
36915    data.ariaLiveLabel.text("Slide ".concat(index + 1, " of ").concat(anchors.length, ".")); // Cross Fade / Out-In
36916
36917    if (animation === 'cross') {
36918      var reduced = Math.round(duration - duration * config.crossOver);
36919      var wait = Math.round(duration - reduced);
36920      fadeRule = 'opacity ' + reduced + 'ms ' + easing;
36921      tram(prevTargs).set({
36922        visibility: ''
36923      }).add(fadeRule).start({
36924        opacity: 0
36925      });
36926      tram(targets).set({
36927        visibility: '',
36928        x: offsetX,
36929        opacity: 0,
36930        zIndex: data.depth++
36931      }).add(fadeRule).wait(wait).then({
36932        opacity: 1
36933      }).then(resetOthers);
36934      return;
36935    } // Fade Over
36936
36937
36938    if (animation === 'fade') {
36939      tram(prevTargs).set({
36940        visibility: ''
36941      }).stop();
36942      tram(targets).set({
36943        visibility: '',
36944        x: offsetX,
36945        opacity: 0,
36946        zIndex: data.depth++
36947      }).add(fadeRule).start({
36948        opacity: 1
36949      }).then(resetOthers);
36950      return;
36951    } // Slide Over
36952
36953
36954    if (animation === 'over') {
36955      resetConfig = {
36956        x: data.endX
36957      };
36958      tram(prevTargs).set({
36959        visibility: ''
36960      }).stop();
36961      tram(targets).set({
36962        visibility: '',
36963        zIndex: data.depth++,
36964        x: offsetX + anchors[data.index].width * vector
36965      }).add(slideRule).start({
36966        x: offsetX
36967      }).then(resetOthers);
36968      return;
36969    } // Slide - infinite scroll
36970
36971
36972    if (config.infinite && shift.x) {
36973      tram(data.slides.not(prevTargs)).set({
36974        visibility: '',
36975        x: shift.x
36976      }).add(slideRule).start({
36977        x: offsetX
36978      });
36979      tram(prevTargs).set({
36980        visibility: '',
36981        x: shift.from
36982      }).add(slideRule).start({
36983        x: shift.to
36984      });
36985      data.shifted = prevTargs;
36986    } else {
36987      if (config.infinite && data.shifted) {
36988        tram(data.shifted).set({
36989          visibility: '',
36990          x: lastOffsetX
36991        });
36992        data.shifted = null;
36993      } // Slide - basic scroll
36994
36995
36996      tram(data.slides).set({
36997        visibility: ''
36998      }).add(slideRule).start({
36999        x: offsetX
37000      });
37001    } // Helper to move others out of view
37002
37003
37004    function resetOthers() {
37005      targets = $(anchors[data.index].els);
37006      others = data.slides.not(targets);
37007
37008      if (animation !== 'slide') {
37009        resetConfig.visibility = 'hidden';
37010      }
37011
37012      tram(others).set(resetConfig);
37013    }
37014  }
37015
37016  function render(i, el) {
37017    var data = $.data(el, namespace);
37018
37019    if (!data) {
37020      return;
37021    }
37022
37023    if (maskChanged(data)) {
37024      return layout(data);
37025    }
37026
37027    if (designer && slidesChanged(data)) {
37028      layout(data);
37029    }
37030  }
37031
37032  function layout(data) {
37033    // Determine page count from width of slides
37034    var pages = 1;
37035    var offset = 0;
37036    var anchor = 0;
37037    var width = 0;
37038    var maskWidth = data.maskWidth;
37039    var threshold = maskWidth - data.config.edge;
37040
37041    if (threshold < 0) {
37042      threshold = 0;
37043    }
37044
37045    data.anchors = [{
37046      els: [],
37047      x: 0,
37048      width: 0
37049    }];
37050    data.slides.each(function (i, el) {
37051      if (anchor - offset > threshold) {
37052        pages++;
37053        offset += maskWidth; // Store page anchor for transition
37054
37055        data.anchors[pages - 1] = {
37056          els: [],
37057          x: anchor,
37058          width: 0
37059        };
37060      } // Set next anchor using current width + margin
37061
37062
37063      width = $(el).outerWidth(true);
37064      anchor += width;
37065      data.anchors[pages - 1].width += width;
37066      data.anchors[pages - 1].els.push(el);
37067      var ariaLabel = i + 1 + ' of ' + data.slides.length;
37068      $(el).attr('aria-label', ariaLabel);
37069      $(el).attr('role', 'group');
37070    });
37071    data.endX = anchor; // Build dots if nav exists and needs updating
37072
37073    if (designer) {
37074      data.pages = null;
37075    }
37076
37077    if (data.nav.length && data.pages !== pages) {
37078      data.pages = pages;
37079      buildNav(data);
37080    } // Make sure index is still within range and call change handler
37081
37082
37083    var index = data.index;
37084
37085    if (index >= pages) {
37086      index = pages - 1;
37087    }
37088
37089    change(data, {
37090      immediate: true,
37091      index: index
37092    });
37093  }
37094
37095  function buildNav(data) {
37096    var dots = [];
37097    var $dot;
37098    var spacing = data.el.attr('data-nav-spacing');
37099
37100    if (spacing) {
37101      spacing = parseFloat(spacing) + 'px';
37102    }
37103
37104    for (var i = 0, len = data.pages; i < len; i++) {
37105      $dot = $(dot);
37106      $dot.attr('aria-label', 'Show slide ' + (i + 1) + ' of ' + len).attr('aria-pressed', 'false').attr('role', 'button').attr('tabindex', '-1');
37107
37108      if (data.nav.hasClass('w-num')) {
37109        $dot.text(i + 1);
37110      }
37111
37112      if (spacing != null) {
37113        $dot.css({
37114          'margin-left': spacing,
37115          'margin-right': spacing
37116        });
37117      }
37118
37119      dots.push($dot);
37120    }
37121
37122    data.nav.empty().append(dots);
37123  }
37124
37125  function maskChanged(data) {
37126    var maskWidth = data.mask.width();
37127
37128    if (data.maskWidth !== maskWidth) {
37129      data.maskWidth = maskWidth;
37130      return true;
37131    }
37132
37133    return false;
37134  }
37135
37136  function slidesChanged(data) {
37137    var slidesWidth = 0;
37138    data.slides.each(function (i, el) {
37139      slidesWidth += $(el).outerWidth(true);
37140    });
37141
37142    if (data.slidesWidth !== slidesWidth) {
37143      data.slidesWidth = slidesWidth;
37144      return true;
37145    }
37146
37147    return false;
37148  } // Export module
37149
37150
37151  return api;
37152});
37153
37154/***/ })
37155/******/ ]);/**
37156 * ----------------------------------------------------------------------
37157 * Webflow: Interactions 2.0: Init
37158 */
37159Webflow.require('ix2').init(
37160{"events":{"e":{"id":"e","name":"","animationType":"custom","eventTypeId":"MOUSE_CLICK","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-2"}},"mediaQueries":["medium","small","tiny"],"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352","appliesTo":"ELEMENT","styleBlockIds":[]},"targets":[{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":null,"scrollOffsetUnit":null,"delay":0,"direction":null,"effectIn":null},"createdOn":1617078341299},"e-2":{"id":"e-2","name":"","animationType":"custom","eventTypeId":"MOUSE_SECOND_CLICK","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-2","affectedElements":{},"playInReverse":false,"autoStopEventId":"e"}},"mediaQueries":["medium","small","tiny"],"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352","appliesTo":"ELEMENT","styleBlockIds":[]},"targets":[{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":true,"scrollOffsetValue":null,"scrollOffsetUnit":null,"delay":0,"direction":null,"effectIn":null},"createdOn":1617078341301},"e-3":{"id":"e-3","name":"","animationType":"custom","eventTypeId":"SCROLL_INTO_VIEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-3","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-4"}},"mediaQueries":["main"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"id":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617796974362},"e-4":{"id":"e-4","name":"","animationType":"custom","eventTypeId":"SCROLL_OUT_OF_VIEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-4","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-3"}},"mediaQueries":["main"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"id":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617796974363},"e-5":{"id":"e-5","name":"","animationType":"custom","eventTypeId":"SCROLL_INTO_VIEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-5","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-6"}},"mediaQueries":["medium","small"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617852473439},"e-6":{"id":"e-6","name":"","animationType":"custom","eventTypeId":"SCROLL_OUT_OF_VIEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-4","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-5"}},"mediaQueries":["medium","small"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617852473440},"e-7":{"id":"e-7","name":"","animationType":"custom","eventTypeId":"SCROLL_INTO_VIEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-7","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-8"}},"mediaQueries":["tiny"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617852807071},"e-8":{"id":"e-8","name":"","animationType":"custom","eventTypeId":"SCROLL_OUT_OF_V
37160IEW","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-4","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-7"}},"mediaQueries":["tiny"],"target":{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"},"targets":[{"selector":".footer","originalId":"f6ec05bd-11aa-292d-6b78-439722d7a407","appliesTo":"CLASS"}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":0,"scrollOffsetUnit":"%","delay":null,"direction":null,"effectIn":null},"createdOn":1617852807072},"e-9":{"id":"e-9","name":"","animationType":"custom","eventTypeId":"MOUSE_CLICK","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-8","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-10"}},"mediaQueries":["medium","small","tiny"],"target":{"id":"e0ab08e7-dc34-97b4-2141-dbcb7dbf00d3","appliesTo":"ELEMENT","styleBlockIds":[]},"targets":[{"id":"e0ab08e7-dc34-97b4-2141-dbcb7dbf00d3","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":null,"scrollOffsetUnit":null,"delay":null,"direction":null,"effectIn":null},"createdOn":1623744415413},"e-10":{"id":"e-10","name":"","animationType":"custom","eventTypeId":"MOUSE_SECOND_CLICK","action":{"id":"","actionTypeId":"GENERAL_START_ACTION","config":{"delay":0,"easing":"","duration":0,"actionListId":"a-9","affectedElements":{},"playInReverse":false,"autoStopEventId":"e-9"}},"mediaQueries":["medium","small","tiny"],"target":{"id":"e0ab08e7-dc34-97b4-2141-dbcb7dbf00d3","appliesTo":"ELEMENT","styleBlockIds":[]},"targets":[{"id":"e0ab08e7-dc34-97b4-2141-dbcb7dbf00d3","appliesTo":"ELEMENT","styleBlockIds":[]}],"config":{"loop":false,"playInReverse":false,"scrollOffsetValue":null,"scrollOffsetUnit":null,"delay":null,"direction":null,"effectIn":null},"createdOn":1623744415414}},"actionLists":{"a":{"id":"a","title":"menu-open","actionItemGroups":[{"actionItems":[{"id":"a-n","actionTypeId":"PLUGIN_LOTTIE","config":{"delay":0,"easing":"","duration":200,"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352"},"value":0}}]},{"actionItems":[{"id":"a-n-2","actionTypeId":"PLUGIN_LOTTIE","config":{"delay":0,"easing":"","duration":500,"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352"},"value":50}}]}],"useFirstGroupAsInitialState":true,"createdOn":1617078371111},"a-2":{"id":"a-2","title":"menu-close","actionItemGroups":[{"actionItems":[{"id":"a-2-n","actionTypeId":"PLUGIN_LOTTIE","config":{"delay":0,"easing":"","duration":0,"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352"},"value":50}}]},{"actionItems":[{"id":"a-2-n-2","actionTypeId":"PLUGIN_LOTTIE","config":{"delay":0,"easing":"","duration":500,"target":{"id":"57b38d54-9901-99c9-fc4e-fa9250e2c352"},"value":0}}]}],"useFirstGroupAsInitialState":false,"createdOn":1617078422436},"a-3":{"id":"a-3","title":"back-to-top-Desktop","actionItemGroups":[{"actionItems":[{"id":"a-3-n","actionTypeId":"TRANSFORM_MOVE","config":{"delay":0,"easing":"","duration":500,"target":{"useEventTarget":"CHILDREN","selector":".back-to-top","selectorGuids":["b542d64a-48b2-1f97-4c89-594c43098a8d"]},"yValue":-90,"xUnit":"PX","yUnit":"px","zUnit":"PX"}}]}],"useFirstGroupAsInitialState":false,"createdOn":1617797027073},"a-4":{"id":"a-4","title":"back-to-top-Initial","actionItemGroups":[{"actionItems":[{"id":"a-4-n","actionTypeId":"TRANSFORM_MOVE","config":{"delay":0,"easing":"","duration":500,"target":{"useEventTarget":"CHILDREN","selector":".back-to-top","selectorGuids":["b542d64a-48b2-1f97-4c89-594c43098a8d"]},"yValue":0,"xUnit":"PX","yUnit":"px","zUnit":"PX"}}]}],"useFirstGroupAsInitialState":false,"createdOn":1617797139144},"a-5":{"id":"a-5","title":"back-to-top-Tablet","actionItemGroups":[{"actionItems":[{"id":"a-5-n","actionTypeId":"TRANSFORM_MOVE","config":{"delay":0,"easing":"","duration":500,"target":{"useEventTarget":"CHILDREN","selector":".back-to-top","selectorGuids":["b542d64a-48b2-1f97-4c89-594c43098a8d"]},"yValue":-160,"xUnit":"PX","yUnit":"px","zUnit":"PX"}}]}],"useFirstGroupAsInitialState":false,"createdOn":1617797027073},"a-7":{"id":"a-7","title":"back-to-top-Mobile","actionItemGroups":[{"actionItems":[{"id":"a-7-n","actionTypeId":"TRANSFORM_MOVE","config":{"delay":0,"easing":"","duration":500,"target":{"useEventTarget":"CHILDREN","selector":".back-to-top","selectorGuids":["b542d64a-48b2-1f97-4c89-594c43098a8d"]},"yValue":-200,"xUnit":"PX","yUnit":"px","zUnit":"PX"}}]}],"useFirstGroupAsInitialState":false,"createdOn":1617797027073},"a-8":{"id":"a-8","title":"nav-link-arrow-rotate","actionItemGroups":[{"actionItems":[{"id":"a-8-n","actionTypeId":"TRANSFORM_ROTATE","config":{"delay":0,"easing":"","duration":500,"target":{"useEventTarget":"CHILDREN","selector":".navlink-arrow","selectorGuids":["6ce161ba-ab73-9cf9-2360-56d55d373f57"]},"zValue":0,"xUnit":"DEG","yUnit":"DEG","zUnit":"deg"}}]},{"actionItems":[{"id":"a-8-n-2","actionTypeId":"TRANSFORM_ROTATE","config":{"delay":0,"easing":"","duration":200,"target":{"useEventTarget":"CHILDREN","selector":".navlink-arrow","selectorGuids":["6ce161ba-ab73-9cf9-2360-56d55d373f57"]},"zValue":90,"xUnit":"DEG","yUnit":"DEG","zUnit":"deg"}}]}],"useFirstGroupAsInitialState":true,"createdOn":1623742395068},"a-9":{"id":"a-9","title":"nav-link-arrow-rotate 2","actionItemGroups":[{"actionItems":[{"id":"a-9-n-2","actionTypeId":"TRANSFORM_ROTATE","config":{"delay":0,"easing":"","duration":200,"target":{"useEventTarget":"CHILDREN","selector":".navlink-arrow","selectorGuids":["6ce161ba-ab73-9cf9-2360-56d55d373f57"]},"zValue":90,"xUnit":"DEG","yUnit":"DEG","zUnit":"deg"}}]},{"actionItems":[{"id":"a-9-n-3","actionTypeId":"TRANSFORM_ROTATE","config":{"delay":0,"easing":"","duration":200,"target":{"useEventTarget":"CHILDREN","selector":".navlink-arrow","selectorGuids":["6ce161ba-ab73-9cf9-2360-56d55d373f57"]},"zValue":0,"xUnit":"DEG","yUnit":"DEG","zUnit":"deg"}}]}],"useFirstGroupAsInitialState":false,"createdOn":1623742395068}},"site":{"mediaQueries":[{"key":"main","min":992,"max":10000},{"key":"medium","min":768,"max":991},{"key":"small","min":480,"max":767},{"key":"tiny","min":0,"max":479}]}}
37161);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.